Documentation
¶
Index ¶
- type Annotations
- type AppTraitMapping
- type Config
- func (c Config) GetResourceType(ctx context.Context, rtID string) (*v2.ResourceType, error)
- func (c Config) GetResourceTypes(ctx context.Context) ([]*v2.ResourceType, error)
- func (c Config) GetSQLSyncers(ctx context.Context, db *sql.DB, dbEngine database.DbEngine, celEnv *bcel.Env) ([]connectorbuilder.ResourceSyncer, error)
- type DatabaseConfig
- type EntitlementMapping
- type EntitlementsQuery
- type GrantMapping
- type GrantsQuery
- type GroupTraitMapping
- type ListQuery
- type Pagination
- type ResourceMapping
- type ResourceType
- type RoleTraitMapping
- type SQLSyncer
- func (s *SQLSyncer) Entitlements(ctx context.Context, resource *v2.Resource, pToken *pagination.Token) ([]*v2.Entitlement, string, annotations.Annotations, error)
- func (s *SQLSyncer) Grants(ctx context.Context, resource *v2.Resource, pToken *pagination.Token) ([]*v2.Grant, string, annotations.Annotations, error)
- func (s *SQLSyncer) List(ctx context.Context, parentResourceID *v2.ResourceId, pToken *pagination.Token) ([]*v2.Resource, string, annotations.Annotations, error)
- func (s *SQLSyncer) ResourceType(ctx context.Context) *v2.ResourceType
- type Traits
- type UserTraitMapping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotations ¶
type Annotations struct {
EntitlementImmutable *connector_v2.EntitlementImmutable `yaml:"entitlement_immutable" json:"entitlement_immutable"`
ExternalLink *connector_v2.ExternalLink `yaml:"external_link" json:"external_link"`
}
type AppTraitMapping ¶
type Config ¶
type Config struct {
AppName string `yaml:"app_name" json:"app_name"`
Connect DatabaseConfig `yaml:"connect" json:"connect"`
ResourceTypes map[string]ResourceType `yaml:"resource_types" json:"resource_types"`
}
func LoadConfigFromFile ¶
func (Config) GetResourceType ¶
func (Config) GetResourceTypes ¶
func (Config) GetSQLSyncers ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
DSN string `yaml:"dsn" json:"dsn"` // DSN connection string
}
type EntitlementMapping ¶
type EntitlementMapping struct {
Id string `yaml:"id" json:"id"`
DisplayName string `yaml:"display_name" json:"display_name"`
Description string `yaml:"description" json:"description"`
GrantableTo []string `yaml:"grantable_to" json:"grantable_to"`
Purpose string `yaml:"purpose" json:"purpose"`
Slug string `yaml:"slug" json:"slug"`
Immutable bool `yaml:"immutable" json:"immutable"`
}
type EntitlementsQuery ¶
type EntitlementsQuery struct {
Query string `yaml:"query" json:"query"`
Pagination *Pagination `yaml:"pagination" json:"pagination"`
Map *EntitlementMapping `yaml:"map" json:"map"`
}
type GrantMapping ¶
type GrantMapping struct {
SkipIf string `yaml:"skip_if" json:"skip_if"`
PrincipalId string `yaml:"principal_id" json:"principal_id"`
PrincipalType string `yaml:"principal_type" json:"principal_type"`
Entitlement string `yaml:"entitlement_id" json:"entitlement_id"`
Annotations *Annotations `yaml:"annotations" json:"annotations"`
}
type GrantsQuery ¶
type GrantsQuery struct {
Query string `yaml:"query" json:"query"`
Pagination *Pagination `yaml:"pagination" json:"pagination"`
Map *GrantMapping `yaml:"map" json:"map"`
}
type GroupTraitMapping ¶
type ListQuery ¶
type ListQuery struct {
Query string `yaml:"query" json:"query"`
Pagination *Pagination `yaml:"pagination" json:"pagination"`
Map *ResourceMapping `yaml:"map" json:"map"`
}
type Pagination ¶
type ResourceMapping ¶
type ResourceMapping struct {
Id string `yaml:"id" json:"id"`
DisplayName string `yaml:"display_name" json:"display_name"`
Description string `yaml:"description" json:"description"`
Traits *Traits `yaml:"traits" json:"traits"`
Annotations *Annotations `yaml:"annotations" json:"annotations"`
}
type ResourceType ¶
type ResourceType struct {
Name string `yaml:"name" json:"name"`
List *ListQuery `yaml:"list,omitempty" json:"list,omitempty"`
Entitlements *EntitlementsQuery `yaml:"entitlements,omitempty" json:"entitlements,omitempty"`
StaticEntitlements []*EntitlementMapping `yaml:"static_entitlements,omitempty" json:"static_entitlements,omitempty"`
Grants []*GrantsQuery `yaml:"grants,omitempty" json:"grants,omitempty"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
}
type RoleTraitMapping ¶
type SQLSyncer ¶
type SQLSyncer struct {
// contains filtered or unexported fields
}
func (*SQLSyncer) Entitlements ¶
func (s *SQLSyncer) Entitlements(ctx context.Context, resource *v2.Resource, pToken *pagination.Token) ([]*v2.Entitlement, string, annotations.Annotations, error)
func (*SQLSyncer) Grants ¶
func (s *SQLSyncer) Grants(ctx context.Context, resource *v2.Resource, pToken *pagination.Token) ([]*v2.Grant, string, annotations.Annotations, error)
func (*SQLSyncer) List ¶
func (s *SQLSyncer) List(ctx context.Context, parentResourceID *v2.ResourceId, pToken *pagination.Token) ([]*v2.Resource, string, annotations.Annotations, error)
func (*SQLSyncer) ResourceType ¶
func (s *SQLSyncer) ResourceType(ctx context.Context) *v2.ResourceType
type Traits ¶
type Traits struct {
App *AppTraitMapping `yaml:"app" json:"app"`
Group *GroupTraitMapping `yaml:"group" json:"group"`
Role *RoleTraitMapping `yaml:"role" json:"role"`
User *UserTraitMapping `yaml:"user" json:"user"`
}
type UserTraitMapping ¶
type UserTraitMapping struct {
Emails []string `yaml:"emails" json:"emails"`
Status string `yaml:"status" json:"status"`
StatusDetails string `yaml:"status_details" json:"status_details"`
Profile map[string]string `yaml:"profile" json:"profile"`
AccountType string `yaml:"account_type" json:"account_type"`
Login string `yaml:"login" json:"login"`
LoginAliases []string `yaml:"login_aliases" json:"login_aliases"`
LastLogin string `yaml:"last_login" json:"last_login"`
MfaEnabled string `yaml:"mfa_enabled" json:"mfa_enabled"`
SsoEnabled string `yaml:"sso_enabled" json:"sso_enabled"`
}
Click to show internal directories.
Click to hide internal directories.