targets

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MPL-2.0 Imports: 16 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	Id         string                 `json:"id,omitempty"`
	Value      string                 `json:"value,omitempty"`
	ScopeId    string                 `json:"scope_id,omitempty"`
	Attributes *TargetAliasAttributes `json:"attributes,omitempty"`
}

type AuthorizeSessionArguments

type AuthorizeSessionArguments struct {
	HostId string `json:"host_id,omitempty"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a client for this collection

func NewClient

func NewClient(c *api.Client) *Client

Creates a new client for this collection. The submitted API client is cloned; modifications to it after generating this client will not have effect. If you need to make changes to the underlying API client, use ApiClient() to access it.

func (*Client) AddCredentialSources

func (c *Client) AddCredentialSources(ctx context.Context, id string, version uint32, opt ...Option) (*TargetUpdateResult, error)

func (*Client) AddHostSources

func (c *Client) AddHostSources(ctx context.Context, id string, version uint32, hostSourceIds []string, opt ...Option) (*TargetUpdateResult, error)

func (*Client) ApiClient

func (c *Client) ApiClient() *api.Client

ApiClient returns the underlying API client

func (*Client) AuthorizeSession

func (c *Client) AuthorizeSession(ctx context.Context, targetId string, opt ...Option) (*SessionAuthorizationResult, error)

func (*Client) Create

func (c *Client) Create(ctx context.Context, resourceType string, scopeId string, opt ...Option) (*TargetCreateResult, error)

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, id string, opt ...Option) (*TargetDeleteResult, error)

func (*Client) List

func (c *Client) List(ctx context.Context, scopeId string, opt ...Option) (*TargetListResult, error)

func (*Client) ListNextPage

func (c *Client) ListNextPage(ctx context.Context, currentPage *TargetListResult, opt ...Option) (*TargetListResult, error)

func (*Client) Read

func (c *Client) Read(ctx context.Context, id string, opt ...Option) (*TargetReadResult, error)

func (*Client) RemoveCredentialSources

func (c *Client) RemoveCredentialSources(ctx context.Context, id string, version uint32, opt ...Option) (*TargetUpdateResult, error)

func (*Client) RemoveHostSources

func (c *Client) RemoveHostSources(ctx context.Context, id string, version uint32, hostSourceIds []string, opt ...Option) (*TargetUpdateResult, error)

func (*Client) SetCredentialSources

func (c *Client) SetCredentialSources(ctx context.Context, id string, version uint32, opt ...Option) (*TargetUpdateResult, error)

func (*Client) SetHostSources

func (c *Client) SetHostSources(ctx context.Context, id string, version uint32, hostSourceIds []string, opt ...Option) (*TargetUpdateResult, error)

func (*Client) Update

func (c *Client) Update(ctx context.Context, id string, version uint32, opt ...Option) (*TargetUpdateResult, error)

type CredentialSource

type CredentialSource struct {
	Id                string `json:"id,omitempty"`
	Name              string `json:"name,omitempty"`
	Description       string `json:"description,omitempty"`
	CredentialStoreId string `json:"credential_store_id,omitempty"`
	Type              string `json:"type,omitempty"`
	CredentialType    string `json:"credential_type,omitempty"`
}

type HostSource

type HostSource struct {
	Id            string `json:"id,omitempty"`
	HostCatalogId string `json:"host_catalog_id,omitempty"`
}

type Option

type Option func(*options)

Option is a func that sets optional attributes for a call. This does not need to be used directly, but instead option arguments are built from the functions in this package. WithX options set a value to that given in the argument; DefaultX options indicate that the value should be set to its default. When an API call is made options are processed in the order they appear in the function call, so for a given argument X, a succession of WithX or DefaultX calls will result in the last call taking effect.

func DefaultAddress

func DefaultAddress() Option

func DefaultAttributes

func DefaultAttributes() Option

func DefaultBrokeredCredentialSourceIds

func DefaultBrokeredCredentialSourceIds() Option

func DefaultDescription

func DefaultDescription() Option

func DefaultEgressWorkerFilter

func DefaultEgressWorkerFilter() Option

func DefaultIngressWorkerFilter

func DefaultIngressWorkerFilter() Option

func DefaultInjectedApplicationCredentialSourceIds

func DefaultInjectedApplicationCredentialSourceIds() Option

func DefaultName

func DefaultName() Option

func DefaultRdpTargetDefaultClientPort

func DefaultRdpTargetDefaultClientPort() Option

func DefaultRdpTargetDefaultPort

func DefaultRdpTargetDefaultPort() Option

func DefaultRdpTargetEnableSessionRecording

func DefaultRdpTargetEnableSessionRecording() Option

func DefaultRdpTargetStorageBucketId

func DefaultRdpTargetStorageBucketId() Option

func DefaultSessionConnectionLimit

func DefaultSessionConnectionLimit() Option

func DefaultSessionMaxSeconds

func DefaultSessionMaxSeconds() Option

func DefaultSshTargetDefaultClientPort

func DefaultSshTargetDefaultClientPort() Option

func DefaultSshTargetDefaultPort

func DefaultSshTargetDefaultPort() Option

func DefaultSshTargetEnableSessionRecording

func DefaultSshTargetEnableSessionRecording() Option

func DefaultSshTargetStorageBucketId

func DefaultSshTargetStorageBucketId() Option

func DefaultTcpTargetDefaultClientPort

func DefaultTcpTargetDefaultClientPort() Option

func DefaultTcpTargetDefaultPort

func DefaultTcpTargetDefaultPort() Option

func DefaultWorkerFilter

func DefaultWorkerFilter() Option

func WithAddress

func WithAddress(inAddress string) Option

func WithAliases

func WithAliases(inAliases []Alias) Option

func WithAttributes

func WithAttributes(inAttributes map[string]interface{}) Option

func WithAutomaticVersioning

func WithAutomaticVersioning(enable bool) Option

If set, and if the version is zero during an update, the API will perform a fetch to get the current version of the resource and populate it during the update call. This is convenient but opens up the possibility for subtle order-of-modification issues, so use carefully.

func WithBrokeredCredentialSourceIds

func WithBrokeredCredentialSourceIds(inBrokeredCredentialSourceIds []string) Option

func WithClientDirectedPagination

func WithClientDirectedPagination(with bool) Option

WithClientDirectedPagination tells the List function to return only the first page, if more pages are available

func WithDescription

func WithDescription(inDescription string) Option

func WithEgressWorkerFilter

func WithEgressWorkerFilter(inEgressWorkerFilter string) Option

func WithFilter

func WithFilter(filter string) Option

WithFilter tells the API to filter the items returned using the provided filter term. The filter should be in a format supported by hashicorp/go-bexpr.

func WithHostId

func WithHostId(inHostId string) Option

func WithIngressWorkerFilter

func WithIngressWorkerFilter(inIngressWorkerFilter string) Option

func WithInjectedApplicationCredentialSourceIds

func WithInjectedApplicationCredentialSourceIds(inInjectedApplicationCredentialSourceIds []string) Option

func WithListToken

func WithListToken(listToken string) Option

WithListToken tells the API to use the provided list token for listing operations on this resource.

func WithName

func WithName(inName string) Option

func WithPageSize

func WithPageSize(with uint32) Option

WithPageSize controls the size of pages used during List

func WithRdpTargetDefaultClientPort

func WithRdpTargetDefaultClientPort(inDefaultClientPort uint32) Option

func WithRdpTargetDefaultPort

func WithRdpTargetDefaultPort(inDefaultPort uint32) Option

func WithRdpTargetEnableSessionRecording

func WithRdpTargetEnableSessionRecording(inEnableSessionRecording bool) Option

func WithRdpTargetStorageBucketId

func WithRdpTargetStorageBucketId(inStorageBucketId string) Option

func WithRecursive

func WithRecursive(recurse bool) Option

WithRecursive tells the API to use recursion for listing operations on this resource

func WithResourcePathOverride

func WithResourcePathOverride(path string) Option

WithResourcePathOverride tells the API to use the provided resource path

func WithScopeId

func WithScopeId(inScopeId string) Option

func WithScopeName

func WithScopeName(inScopeName string) Option

func WithSessionConnectionLimit

func WithSessionConnectionLimit(inSessionConnectionLimit int32) Option

func WithSessionMaxSeconds

func WithSessionMaxSeconds(inSessionMaxSeconds uint32) Option

func WithSkipCurlOutput

func WithSkipCurlOutput(skip bool) Option

WithSkipCurlOutput tells the API to not use the current call for cURL output. Useful for when we need to look up versions.

func WithSshTargetDefaultClientPort

func WithSshTargetDefaultClientPort(inDefaultClientPort uint32) Option

func WithSshTargetDefaultPort

func WithSshTargetDefaultPort(inDefaultPort uint32) Option

func WithSshTargetEnableSessionRecording

func WithSshTargetEnableSessionRecording(inEnableSessionRecording bool) Option

func WithSshTargetStorageBucketId

func WithSshTargetStorageBucketId(inStorageBucketId string) Option

func WithTcpTargetDefaultClientPort

func WithTcpTargetDefaultClientPort(inDefaultClientPort uint32) Option

func WithTcpTargetDefaultPort

func WithTcpTargetDefaultPort(inDefaultPort uint32) Option

func WithWorkerFilter

func WithWorkerFilter(inWorkerFilter string) Option

type RdpTargetAttributes

type RdpTargetAttributes struct {
	DefaultPort            uint32 `json:"default_port,omitempty"`
	DefaultClientPort      uint32 `json:"default_client_port,omitempty"`
	StorageBucketId        string `json:"storage_bucket_id,omitempty"`
	EnableSessionRecording bool   `json:"enable_session_recording,omitempty"`
}

func AttributesMapToRdpTargetAttributes

func AttributesMapToRdpTargetAttributes(in map[string]any) (*RdpTargetAttributes, error)

type SessionAuthorization

type SessionAuthorization struct {
	SessionId          string               `json:"session_id,omitempty"`
	TargetId           string               `json:"target_id,omitempty"`
	Scope              *scopes.ScopeInfo    `json:"scope,omitempty"`
	CreatedTime        time.Time            `json:"created_time,omitempty"`
	UserId             string               `json:"user_id,omitempty"`
	HostSetId          string               `json:"host_set_id,omitempty"`
	HostId             string               `json:"host_id,omitempty"`
	Type               string               `json:"type,omitempty"`
	AuthorizationToken string               `json:"authorization_token,omitempty"`
	ConnectionLimit    int32                `json:"connection_limit,omitempty"`
	Endpoint           string               `json:"endpoint,omitempty"`
	EndpointPort       uint32               `json:"endpoint_port,omitempty"`
	Expiration         time.Time            `json:"expiration,omitempty"`
	Credentials        []*SessionCredential `json:"credentials,omitempty"`
	SessionRecordingId string               `json:"session_recording_id,omitempty"`
}

func (SessionAuthorization) GetSessionAuthorizationData

func (n SessionAuthorization) GetSessionAuthorizationData() (*SessionAuthorizationData, error)

type SessionAuthorizationData

type SessionAuthorizationData struct {
	SessionId         string            `json:"session_id,omitempty"`
	TargetId          string            `json:"target_id,omitempty"`
	Scope             *scopes.ScopeInfo `json:"scope,omitempty"`
	CreatedTime       time.Time         `json:"created_time,omitempty"`
	Type              string            `json:"type,omitempty"`
	ConnectionLimit   int32             `json:"connection_limit,omitempty"`
	EndpointPort      uint32            `json:"endpoint_port,omitempty"`
	Expiration        time.Time         `json:"expiration,omitempty"`
	Certificate       []byte            `json:"certificate,omitempty"`
	PrivateKey        []byte            `json:"private_key,omitempty"`
	HostId            string            `json:"host_id,omitempty"`
	Endpoint          string            `json:"endpoint,omitempty"`
	WorkerInfo        []*WorkerInfo     `json:"worker_info,omitempty"`
	DefaultClientPort uint32            `json:"default_client_port,omitempty"`
}

type SessionAuthorizationResult

type SessionAuthorizationResult struct {
	Item *SessionAuthorization
	// contains filtered or unexported fields
}

func (SessionAuthorizationResult) GetItem

func (n SessionAuthorizationResult) GetItem() any

func (SessionAuthorizationResult) GetResponse

func (n SessionAuthorizationResult) GetResponse() *api.Response

func (SessionAuthorizationResult) GetSessionAuthorization

func (n SessionAuthorizationResult) GetSessionAuthorization() (*SessionAuthorization, error)

type SessionCredential

type SessionCredential struct {
	CredentialSource *CredentialSource      `json:"credential_source,omitempty"`
	Secret           *SessionSecret         `json:"secret,omitempty"`
	Credential       map[string]interface{} `json:"credential,omitempty"`
}

type SessionSecret

type SessionSecret struct {
	Raw     json.RawMessage        `json:"raw,omitempty"`
	Decoded map[string]interface{} `json:"decoded,omitempty"`
}

type SshTargetAttributes

type SshTargetAttributes struct {
	DefaultPort            uint32 `json:"default_port,omitempty"`
	DefaultClientPort      uint32 `json:"default_client_port,omitempty"`
	StorageBucketId        string `json:"storage_bucket_id,omitempty"`
	EnableSessionRecording bool   `json:"enable_session_recording,omitempty"`
}

func AttributesMapToSshTargetAttributes

func AttributesMapToSshTargetAttributes(in map[string]any) (*SshTargetAttributes, error)

type Target

type Target struct {
	Id                                     string                 `json:"id,omitempty"`
	ScopeId                                string                 `json:"scope_id,omitempty"`
	Scope                                  *scopes.ScopeInfo      `json:"scope,omitempty"`
	Name                                   string                 `json:"name,omitempty"`
	Description                            string                 `json:"description,omitempty"`
	CreatedTime                            time.Time              `json:"created_time,omitempty"`
	UpdatedTime                            time.Time              `json:"updated_time,omitempty"`
	Version                                uint32                 `json:"version,omitempty"`
	Type                                   string                 `json:"type,omitempty"`
	HostSourceIds                          []string               `json:"host_source_ids,omitempty"`
	HostSources                            []*HostSource          `json:"host_sources,omitempty"`
	SessionMaxSeconds                      uint32                 `json:"session_max_seconds,omitempty"`
	SessionConnectionLimit                 int32                  `json:"session_connection_limit,omitempty"`
	WorkerFilter                           string                 `json:"worker_filter,omitempty"`
	EgressWorkerFilter                     string                 `json:"egress_worker_filter,omitempty"`
	IngressWorkerFilter                    string                 `json:"ingress_worker_filter,omitempty"`
	BrokeredCredentialSourceIds            []string               `json:"brokered_credential_source_ids,omitempty"`
	BrokeredCredentialSources              []*CredentialSource    `json:"brokered_credential_sources,omitempty"`
	InjectedApplicationCredentialSourceIds []string               `json:"injected_application_credential_source_ids,omitempty"`
	InjectedApplicationCredentialSources   []*CredentialSource    `json:"injected_application_credential_sources,omitempty"`
	Attributes                             map[string]interface{} `json:"attributes,omitempty"`
	AuthorizedActions                      []string               `json:"authorized_actions,omitempty"`
	Address                                string                 `json:"address,omitempty"`
	Aliases                                []*Alias               `json:"aliases,omitempty"`
	WithAliases                            []*Alias               `json:"with_aliases,omitempty"`
}

func (*Target) GetRdpTargetAttributes

func (pt *Target) GetRdpTargetAttributes() (*RdpTargetAttributes, error)

func (*Target) GetSshTargetAttributes

func (pt *Target) GetSshTargetAttributes() (*SshTargetAttributes, error)

func (*Target) GetTcpTargetAttributes

func (pt *Target) GetTcpTargetAttributes() (*TcpTargetAttributes, error)

type TargetAliasAttributes

type TargetAliasAttributes struct {
	AuthorizeSessionArguments *AuthorizeSessionArguments `json:"authorize_session_arguments,omitempty"`
}

type TargetCreateResult

type TargetCreateResult = TargetReadResult

type TargetDeleteResult

type TargetDeleteResult struct {
	Response *api.Response
}

func (TargetDeleteResult) GetItem

func (n TargetDeleteResult) GetItem() any

GetItem will always be nil for TargetDeleteResult

func (TargetDeleteResult) GetResponse

func (n TargetDeleteResult) GetResponse() *api.Response

type TargetListResult

type TargetListResult struct {
	Items        []*Target `json:"items,omitempty"`
	EstItemCount uint      `json:"est_item_count,omitempty"`
	RemovedIds   []string  `json:"removed_ids,omitempty"`
	ListToken    string    `json:"list_token,omitempty"`
	ResponseType string    `json:"response_type,omitempty"`
	Response     *api.Response
	// contains filtered or unexported fields
}

func (TargetListResult) GetEstItemCount

func (n TargetListResult) GetEstItemCount() uint

func (TargetListResult) GetItems

func (n TargetListResult) GetItems() []*Target

func (TargetListResult) GetListToken

func (n TargetListResult) GetListToken() string

func (TargetListResult) GetRemovedIds

func (n TargetListResult) GetRemovedIds() []string

func (TargetListResult) GetResponse

func (n TargetListResult) GetResponse() *api.Response

func (TargetListResult) GetResponseType

func (n TargetListResult) GetResponseType() string

type TargetReadResult

type TargetReadResult struct {
	Item     *Target
	Response *api.Response
}

func (TargetReadResult) GetItem

func (n TargetReadResult) GetItem() *Target

func (TargetReadResult) GetResponse

func (n TargetReadResult) GetResponse() *api.Response

type TargetUpdateResult

type TargetUpdateResult = TargetReadResult

type TcpTargetAttributes

type TcpTargetAttributes struct {
	DefaultPort       uint32 `json:"default_port,omitempty"`
	DefaultClientPort uint32 `json:"default_client_port,omitempty"`
}

func AttributesMapToTcpTargetAttributes

func AttributesMapToTcpTargetAttributes(in map[string]any) (*TcpTargetAttributes, error)

type WorkerInfo

type WorkerInfo struct {
	Address string `json:"address,omitempty"`
}

Jump to

Keyboard shortcuts

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