lwdomain

package
v1.50.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

README

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:

import "github.com/lacework/go-sdk/lwdomain"

Examples

The following URL https://account.lacework.net would be disseminated into:

  • account as the account name
package main

import (
	"fmt"
	"os"

	"github.com/lacework/go-sdk/lwdomain"
)

func main() {
	domain, err := lwdomain.New("https://account.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)
}

Documentation

Overview

A package to disseminate a domain URL into account, cluster and whether or not is internal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(url string) (domain, error)

New returns domain information from the provided URL

For instance, the following URL:

d, err := lwdomain.New("https://account.lacework.net")

Would be disseminated into:

  • `account` as the account name
  • `fra` as the cluster name

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL