Documentation
¶
Index ¶
- func IsAuthProvider(v string) bool
- func IsConnectionType(v string) bool
- func IsModelOperation(v string) bool
- type AuthProvider
- type AuthProviderList
- type AuthRule
- type AuthRuleBuilder
- type AuthRuleList
- func (l AuthRuleList) ForProvider(v string) *AuthRule
- func (l AuthRuleList) HasApiKey() bool
- func (l AuthRuleList) HasCognito() bool
- func (l AuthRuleList) HasIAM() bool
- func (l AuthRuleList) HasLambda() bool
- func (l AuthRuleList) HasOidc() bool
- func (l AuthRuleList) ProvidersAllowedToCreate() AuthProviderList
- func (l AuthRuleList) ProvidersAllowedToDelete() AuthProviderList
- func (l AuthRuleList) ProvidersAllowedToRead() AuthProviderList
- func (l AuthRuleList) ProvidersAllowedToUpdate() AuthProviderList
- type ConnectionType
- type Directive
- type ModelOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAuthProvider ¶
func IsConnectionType ¶
func IsModelOperation ¶
Types ¶
type AuthProvider ¶
type AuthProvider string
const ( APIKEY AuthProvider = "apiKey" IAM AuthProvider = "iam" OIDC AuthProvider = "oidc" COGNITO AuthProvider = "userPools" LAMBDA AuthProvider = "lambda" )
func (AuthProvider) IsApiKey ¶
func (a AuthProvider) IsApiKey() bool
func (AuthProvider) IsCognito ¶
func (a AuthProvider) IsCognito() bool
func (AuthProvider) IsIam ¶
func (a AuthProvider) IsIam() bool
func (AuthProvider) IsLambda ¶
func (a AuthProvider) IsLambda() bool
func (AuthProvider) IsOidc ¶
func (a AuthProvider) IsOidc() bool
type AuthProviderList ¶
type AuthProviderList []*AuthProvider
func (AuthProviderList) Intersection ¶
func (l AuthProviderList) Intersection(ll AuthProviderList) (lll AuthProviderList)
func (AuthProviderList) Union ¶
func (l AuthProviderList) Union(ll AuthProviderList) (lll AuthProviderList)
type AuthRule ¶
type AuthRule struct {
AuthProvider AuthProvider
ModelOperations []ModelOperation
}
type AuthRuleBuilder ¶
type AuthRuleBuilder struct {
AuthProvider AuthProvider
ModelOperations []ModelOperation
}
func NewAuthRuleBuilder ¶
func NewAuthRuleBuilder() *AuthRuleBuilder
func (*AuthRuleBuilder) Build ¶
func (a *AuthRuleBuilder) Build() *AuthRule
func (*AuthRuleBuilder) SetAuthProvider ¶
func (a *AuthRuleBuilder) SetAuthProvider(authProvider string) error
func (*AuthRuleBuilder) SetModelOperations ¶
func (a *AuthRuleBuilder) SetModelOperations(operations []string) error
type AuthRuleList ¶
type AuthRuleList []*AuthRule
func NewAuthRuleList ¶
func NewAuthRuleList(d ast.Directive) *AuthRuleList
func (AuthRuleList) ForProvider ¶
func (l AuthRuleList) ForProvider(v string) *AuthRule
func (AuthRuleList) HasApiKey ¶
func (l AuthRuleList) HasApiKey() bool
func (AuthRuleList) HasCognito ¶
func (l AuthRuleList) HasCognito() bool
func (AuthRuleList) HasIAM ¶
func (l AuthRuleList) HasIAM() bool
func (AuthRuleList) HasLambda ¶
func (l AuthRuleList) HasLambda() bool
func (AuthRuleList) HasOidc ¶
func (l AuthRuleList) HasOidc() bool
func (AuthRuleList) ProvidersAllowedToCreate ¶
func (l AuthRuleList) ProvidersAllowedToCreate() AuthProviderList
func (AuthRuleList) ProvidersAllowedToDelete ¶
func (l AuthRuleList) ProvidersAllowedToDelete() AuthProviderList
func (AuthRuleList) ProvidersAllowedToRead ¶
func (l AuthRuleList) ProvidersAllowedToRead() AuthProviderList
func (AuthRuleList) ProvidersAllowedToUpdate ¶
func (l AuthRuleList) ProvidersAllowedToUpdate() AuthProviderList
type ConnectionType ¶
type ConnectionType string
const ( HasOne ConnectionType = "hasOne" HasMany ConnectionType = "hasMany" ManyToMany ConnectionType = "manyToMany" )
func NewConnection ¶
func NewConnection(name string) *ConnectionType
func (ConnectionType) IsHasMany ¶
func (c ConnectionType) IsHasMany() bool
func (ConnectionType) IsHasOne ¶
func (c ConnectionType) IsHasOne() bool
func (ConnectionType) IsManyToMany ¶
func (c ConnectionType) IsManyToMany() bool
type Directive ¶
type Directive struct {
AuthRules *AuthRuleList
ConnectionType *ConnectionType
}
func NewDirective ¶
func NewDirective(l ast.DirectiveList) *Directive
func (Directive) HasAuthRules ¶
func (Directive) HasConnection ¶
type ModelOperation ¶
type ModelOperation string
const ( CREATE ModelOperation = "create" UPDATE ModelOperation = "update" DELETE ModelOperation = "delete" READ ModelOperation = "read" )
Click to show internal directories.
Click to hide internal directories.