Documentation
¶
Index ¶
- Variables
- 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 Scope
- type SendGridClient
Constants ¶
This section is empty.
Variables ¶
var (
ErrSendgridClientNotProvided = errors.New("sendgrid client not provided")
)
var SendGridScopes = []Scope{}/* 197 elements not displayed */
SendGridScopes is a list of scopes that can be used with SendGrid. Sendgrid does not provide an api to list scopes, so this list is manually https://www.twilio.com/docs/sendgrid/api-reference/api-key-permissions
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.json 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 SendGridClient ¶
type SendGridClient interface { InviteTeammate(ctx context.Context, email string, scopes []string, isAdmin bool) error DeleteTeammate(ctx context.Context, username string) error GetSpecificTeammate(ctx context.Context, username string) (*models.TeammateScope, error) GetTeammates(ctx context.Context, pToken *pagination.Token) ([]models.Teammate, string, error) GetTeammatesSubAccess(ctx context.Context, username string, pToken *pagination.Token) ([]models.TeammateSubuser, string, error) GetPendingTeammates(ctx context.Context, pToken *pagination.Token) ([]models.PendingUserAccess, string, error) SetTeammateScopes(ctx context.Context, username string, scopes []string, isAdmin bool) error GetSubusers(ctx context.Context, pToken *pagination.Token) ([]models.Subuser, string, error) CreateSubuser(ctx context.Context, subuser models.SubuserCreate) error DeleteSubuser(ctx context.Context, username string) error SetSubuserDisabled(ctx context.Context, username string, disabled bool) error }