-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use this package to disseminate a domain URL into account, cluster and whether or not it is an internal account. == Usage Download the library into your `$GOPATH`: $ go get github.com/lacework/go-sdk/lwdomain Import the library into your tool: ```go import "github.com/lacework/go-sdk/lwdomain" ``` == Examples The following URL `https://account.fra.lacework.net` would be disseminated into: * `account` as the account name * `fra` as the cluster name ```go package main import ( "fmt" "os" "github.com/lacework/go-sdk/lwdomain" ) func main() { domain, err := lwdomain.New("https://account.fra.lacework.net") if err != nil { fmt.Printf("Error %s\n", err) os.Exit(1) } // Output: Lacework Account Name: account fmt.Println("Lacework Account Name: %s", domain.Account) } ``` Signed-off-by: Salim Afiune Maya <[email protected]>
- Loading branch information
Showing
7 changed files
with
85 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Lacework Domain | ||
|
||
Use this package to disseminate a domain URL into account, cluster and whether or not | ||
it is an internal account. | ||
|
||
## Usage | ||
|
||
Download the library into your `$GOPATH`: | ||
|
||
$ go get github.com/lacework/go-sdk/lwdomain | ||
|
||
Import the library into your tool: | ||
|
||
```go | ||
import "github.com/lacework/go-sdk/lwdomain" | ||
``` | ||
|
||
## Examples | ||
|
||
The following URL `https://account.fra.lacework.net` would be disseminated into: | ||
* `account` as the account name | ||
* `fra` as the cluster name | ||
|
||
```go | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/lacework/go-sdk/lwdomain" | ||
) | ||
|
||
func main() { | ||
domain, err := lwdomain.New("https://account.fra.lacework.net") | ||
if err != nil { | ||
fmt.Printf("Error %s\n", err) | ||
os.Exit(1) | ||
} | ||
|
||
// Output: Lacework Account Name: account | ||
fmt.Println("Lacework Account Name: %s", domain.Account) | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters