boundary

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMethod

type AuthMethod struct {
	AuthMethodID   string `json:"auth_method_id"`
	AuthMethodName string `json:"auth_method_name"`
	LoginName      string `json:"login_name"`
	Password       string `json:"password"`
	ScopeID        string `json:"scope_id"`
	UserID         string `json:"user_id"`
	UserName       string `json:"user_name"`
}

AuthMethod is the Boundary init generated authentication method.

type CLIRequest

type CLIRequest struct {
	BinName    string
	BinPath    string
	ConfigPath string
	License    string
}

CLIRequest are common things that we need when making a CLI request.

type HostResources

type HostResources struct {
	HostCatalogID   string `json:"host_catalog_id"`
	HostSetID       string `json:"host_set_id"`
	HostID          string `json:"host_id"`
	Type            string `json:"type"`
	ScopeID         string `json:"scope_id"`
	HostCatalogName string `json:"host_catalog_name"`
	HostSetName     string `json:"host_set_name"`
	HostName        string `json:"host_name"`
}

HostResources are the Boundary init generated host resources.

type InitRequest

type InitRequest struct {
	*CLIRequest
}

InitRequest is a Boundary init request.

func NewInitRequest

func NewInitRequest(opts ...InitRequestOpt) *InitRequest

NewInitRequest takes functional options and returns a new init request.

func (*InitRequest) String

func (r *InitRequest) String() string

String returns the init request as an init command.

func (*InitRequest) Validate

func (r *InitRequest) Validate() error

Validate validates that the init request has the required fields.

type InitRequestOpt

type InitRequestOpt func(*InitRequest) *InitRequest

InitRequestOpt is a functional option for an init request.

func WithInitRequestBinName

func WithInitRequestBinName(name string) InitRequestOpt

WithInitRequestBinName sets the Boundary binary name.

func WithInitRequestBinPath

func WithInitRequestBinPath(path string) InitRequestOpt

WithInitRequestBinPath sets the Boundary binary path.

func WithInitRequestConfigPath

func WithInitRequestConfigPath(path string) InitRequestOpt

WithInitRequestConfigPath sets the Boundary config path.

func WithInitRequestLicense

func WithInitRequestLicense(license string) InitRequestOpt

type InitResponse

type InitResponse struct {
	AuthMethod    AuthMethod    `json:"auth_method"`
	HostResources HostResources `json:"host_resources"`
	LoginRole     LoginRole     `json:"login_role"`
	OrgScope      OrgScope      `json:"org_scope"`
	ProjectScope  ProjectScope  `json:"project_scope"`
	Target        Target        `json:"target"`
}

InitResponse is the Boundary init response.

func Init

func Init(ctx context.Context, tr it.Transport, req *InitRequest) (*InitResponse, error)

Init calls boundary init to initialize the database and Boundary cluster, providing default credentials to use upon completion.

type LoginRole

type LoginRole struct {
	ScopeID string `json:"scope_id"`
	Name    string `json:"name"`
}

LoginRole is the Boundary init generated login role.

type OrgScope

type OrgScope struct {
	ScopeID string `json:"scope_id"`
	Type    string `json:"type"`
	Name    string `json:"name"`
}

OrgScope is the Boundary init generated organization scope.

type ProjectScope

type ProjectScope struct {
	ScopeID string `json:"scope_id"`
	Type    string `json:"type"`
	Name    string `json:"name"`
}

ProjectScope is the Boundary init generated project scope.

type Target

type Target struct {
	TargetID               string `json:"target_id"`
	DefaultPort            int    `json:"default_port"`
	SessionMaxSeconds      int    `json:"session_max_seconds"`
	SessionConnectionLimit int    `json:"session_connection_limit"`
	Type                   string `json:"type"`
	ScopeID                string `json:"scope_id"`
	Name                   string `json:"name"`
}

Target is the Boundary init generated target.

Jump to

Keyboard shortcuts

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