Documentation
¶
Index ¶
- type Connector
- func (d *Connector) Asset(ctx context.Context, asset *v2.AssetRef) (string, io.ReadCloser, error)
- func (d *Connector) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error)
- func (d *Connector) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer
- func (d *Connector) Validate(ctx context.Context) (annotations.Annotations, error)
- type UserClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func (*Connector) Asset ¶
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) ResourceSyncers ¶
func (d *Connector) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer
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 UserClient ¶
type UserClient interface {
GetUsers(ctx context.Context, options client.PageOptions) ([]*client.ZuperUser, string, annotations.Annotations, error)
GetUserByID(ctx context.Context, userUID string) (*client.ZuperUser, annotations.Annotations, error)
CreateUser(ctx context.Context, user client.UserPayload) (*client.CreateUserResponse, annotations.Annotations, error)
UpdateUserAccessRole(ctx context.Context, userUID string, accessRoleUID string) (*client.UpdateUserRoleResponse, annotations.Annotations, error)
}
UserClient defines the interface for fetching users with pagination options.
Click to show internal directories.
Click to hide internal directories.