connector

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserCreationMaxDuration = 10 * time.Minute
	UserDeletionMaxDuration = 10 * time.Minute
)
View Source
const (
	AccountPermissionAssignmentMaxWaitDuration = 10 * time.Minute
)
View Source
const (
	NamespacePermissionAssignmentMaxDuration = 10 * time.Minute
)

Variables

This section is empty.

Functions

func AccountAccessRoleFromID added in v0.0.10

func AccountAccessRoleFromID(in string, accountID string) identityv1.AccountAccess_Role

func AccountAccessRoleFromString added in v0.0.10

func AccountAccessRoleFromString(in string) (*identityv1.AccountAccess_Role, error)

AccountAccessRoleFromString parses a string into an AccountAccess_Role using the following (case-insensitive) mapping:

AccountAccess_ROLE_UNSPECIFIED: "unspecified", "role_unspecified"
AccountAccess_ROLE_OWNER: "owner", "role_owner"
AccountAccess_ROLE_ADMIN: "admin", "role_admin"
AccountAccess_ROLE_DEVELOPER: "developer", "role_developer"
AccountAccess_ROLE_FINANCE_ADMIN: "finance-admin", "finance_admin", "role_finance_admin"
AccountAccess_ROLE_READ: "read", "role_read"

Any unknown values with return an error.

func AccountAccessRoleFromStringOrDefault added in v0.0.10

func AccountAccessRoleFromStringOrDefault(in string) identityv1.AccountAccess_Role

AccountAccessRoleFromStringOrDefault is like AccountAccessRoleFromString, but will return AccountAccess_ROLE_UNSPECIFIED instead of an error.

func New

New returns a new instance of the connector.

Types

type AccountCreationSettings added in v0.0.10

type AccountCreationSettings struct {
	DefaultAccountRole identityv1.AccountAccess_Role
}

type Connector

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

func (*Connector) Asset

func (d *Connector) Asset(ctx context.Context, asset *v2.AssetRef) (string, io.ReadCloser, error)

Asset takes an input AssetRef and attempts to fetch it using the connector's authenticated http client It streams a response, always starting with a metadata object, following by chunked payloads for the asset.

func (*Connector) Metadata

func (d *Connector) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error)

Metadata returns metadata about the connector.

func (*Connector) ResourceSyncers

func (d *Connector) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncerV2

ResourceSyncers returns a ResourceSyncer for each resource type that should be synced from the upstream service.

func (*Connector) Validate

func (d *Connector) Validate(ctx context.Context) (annotations.Annotations, error)

Validate is called to ensure that the connector is properly configured. It should exercise any API credentials to be sure that they are valid.

type Opt added in v0.0.10

type Opt func(*Connector) error

func WithDefaultAccountRole added in v0.0.10

func WithDefaultAccountRole(role string) Opt

WithDefaultAccountRole sets the default account role to use for account provisioning. The Opt will parse the input and convert it into an identityv1.AccountAccess_Role using the following (case-insensitive) mapping:

AccountAccess_ROLE_UNSPECIFIED: "unspecified", "role_unspecified"
AccountAccess_ROLE_OWNER: "owner", "role_owner"
AccountAccess_ROLE_ADMIN: "admin", "role_admin"
AccountAccess_ROLE_DEVELOPER: "developer", "role_developer"
AccountAccess_ROLE_FINANCE_ADMIN: "finance-admin", "finance_admin", "role_finance_admin"
AccountAccess_ROLE_READ: "read", "role_read"

Jump to

Keyboard shortcuts

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