Documentation ¶
Index ¶
- Constants
- func UserRoleKey(domainId DomainID, userId UserID) map[string]ddbTypes.AttributeValue
- type Domain
- type DomainID
- type Engine
- type EngineConfig
- type EngineFeatures
- type Link
- type LinkKey
- type Links
- type User
- type UserID
- type UserInvite
- type UserInviteID
- type UserInvites
- type UserRole
- type UserRoles
- type Users
Constants ¶
View Source
const ( AnalyticsProviderGoogle = "google" AnalyticsProviderWebhook = "webhook" AnalyticsProviderMatomo = "matomo" )
View Source
const ( EngineProviderCloudflareWorkers = "cloudflare-workers" EngineProviderAmazonS3 = "aws-s3" EngineProviderStandalone = "standalone" )
Variables ¶
This section is empty.
Functions ¶
func UserRoleKey ¶
func UserRoleKey(domainId DomainID, userId UserID) map[string]ddbTypes.AttributeValue
Types ¶
type Domain ¶
type Domain struct { // core data Id DomainID `json:"id" dynamodbav:"id"` Domain string `json:"domain" dynamodbav:"domain"` Description *string `json:"description,omitempty" dynamodbav:"description,omitempty"` DefaultTarget *string `json:"default_target,omitempty" dynamodbav:"default_target,omitempty"` // engine config Engine EngineConfig `json:"engine" dynamodbav:"engine"` // meta CreatedAt timestamp.Timestamp `json:"created_at" dynamodbav:"created_at"` UpdatedAt timestamp.Timestamp `json:"updated_at" dynamodbav:"updated_at"` UserRole string `json:"user_role,omitempty" dynamodbav:"-"` // not stored in dynamo }
*
- entity
func (*Domain) MarshalDynamoAV ¶
func (domain *Domain) MarshalDynamoAV() (map[string]ddbTypes.AttributeValue, error)
func (*Domain) UnmarshalDynamoAV ¶
func (domain *Domain) UnmarshalDynamoAV(item map[string]ddbTypes.AttributeValue) error
type Engine ¶
type Engine struct { Features EngineFeatures `json:"features" dynamodbav:"features"` ID string `json:"id" dynamodbav:"id"` Name string `json:"name" dynamodbav:"name"` SyncPush bool `json:"sync_push" dynamodbav:"sync_push"` SyncPull bool `json:"sync_pull" dynamodbav:"sync_pull"` SyncCron bool `json:"sync_cron" dynamodbav:"sync_cron"` }
type EngineConfig ¶
type EngineConfig struct { EngineID string `json:"engine_id" dynamodbav:"engine_id"` SyncMode string `json:"sync_mode" dynamodbav:"sync_mode"` // deployment EnableAutoDeploy bool `json:"enable_auto_deploy" dynamodbav:"enable_auto_deploy"` TargetVersion *string `json:"target_version,omitempty" dynamodbav:"target_version,omitempty"` DeployedVersion *string `json:"deployed_version,omitempty" dynamodbav:"deployed_version,omitempty"` DeployedAt *timestamp.Timestamp `json:"deployed_at,omitempty" dynamodbav:"deployed_at,omitempty"` TestedAt *timestamp.Timestamp `json:"tested_at,omitempty" dynamodbav:"tested_at,omitempty"` // redirection ErrorPassthrough bool `json:"error_passthrough" dynamodbav:"error_passthrough"` OpaqueRedirection bool `json:"opaque_redirection" dynamodbav:"opaque_redirection"` // analytics AnalyticsProvider string `json:"analytics_provider" dynamodbav:"analytics_provider"` WaitForAnalytics bool `json:"wait_for_analytics" dynamodbav:"wait_for_analytics"` }
type EngineFeatures ¶
type Link ¶
type Link struct { DomainId DomainID `json:"domain_id" dynamodbav:"domain_id"` URI string `json:"uri" dynamodbav:"uri"` Target string `json:"target" dynamodbav:"target"` CreatedAt timestamp.Timestamp `json:"created_at" dynamodbav:"created_at"` UpdatedAt timestamp.Timestamp `json:"updated_at" dynamodbav:"updated_at"` ExpiresAt *timestamp.Timestamp `json:"expires_at,omitempty" dynamodbav:"expires_at"` }
func (*Link) MarshalDynamoAV ¶
func (link *Link) MarshalDynamoAV() (map[string]ddbTypes.AttributeValue, error)
func (*Link) UnmarshalDynamoAV ¶
func (link *Link) UnmarshalDynamoAV(item map[string]ddbTypes.AttributeValue) error
type LinkKey ¶
func (*LinkKey) MarshalDynamoAV ¶
func (linkKey *LinkKey) MarshalDynamoAV() (map[string]ddbTypes.AttributeValue, error)
func (*LinkKey) MarshalString ¶
func (*LinkKey) UnmarshalDynamoAV ¶
func (linkKey *LinkKey) UnmarshalDynamoAV(item map[string]ddbTypes.AttributeValue) error
func (*LinkKey) UnmarshalString ¶
type Links ¶
type Links []*Link
*
- slice of entities
func (*Links) UnmarshalDynamoAV ¶
func (links *Links) UnmarshalDynamoAV(items []map[string]ddbTypes.AttributeValue) error
type User ¶
type User struct { Id UserID `json:"id" dynamodbav:"id"` Name string `json:"name" dynamodbav:"name"` Username string `json:"-" dynamodbav:"username"` Nickname string `json:"nickname" dynamodbav:"nickname"` Picture string `json:"picture" dynamodbav:"picture"` Role string `json:"role,omitempty" dynamodbav:"-"` // not stored in same table as users }
*
- entity
func (*User) MarshalDynamoAV ¶
func (user *User) MarshalDynamoAV() (map[string]ddbTypes.AttributeValue, error)
func (*User) UnmarshalDynamoAV ¶
func (user *User) UnmarshalDynamoAV(item map[string]ddbTypes.AttributeValue) error
type UserInvite ¶
type UserInvite struct { ID UserInviteID `json:"id" dynamodbav:"id"` Email string `json:"email" dynamodbav:"email"` Role string `json:"role" dynamodbav:"role"` DomainID DomainID `json:"domain_id" dynamodbav:"domain_id"` CreatedAt timestamp.Timestamp `json:"created_at" dynamodbav:"created_at"` ExpiresAt timestamp.Timestamp `json:"expires_at" dynamodbav:"expires_at"` }
func NewUserInvite ¶
func NewUserInvite() *UserInvite
func (*UserInvite) Expired ¶
func (userInvite *UserInvite) Expired() bool
func (*UserInvite) MarshalDynamoAV ¶
func (userInvite *UserInvite) MarshalDynamoAV() (map[string]ddbTypes.AttributeValue, error)
func (*UserInvite) UnmarshalDynamoAV ¶
func (userInvite *UserInvite) UnmarshalDynamoAV(item map[string]ddbTypes.AttributeValue) error
type UserInvites ¶
type UserInvites []*UserInvite
*
- slice of entities
func (*UserInvites) UnmarshalDynamoAV ¶
func (userInvites *UserInvites) UnmarshalDynamoAV(items []map[string]ddbTypes.AttributeValue) error
type UserRole ¶
type UserRole struct { DomainID DomainID `json:"domain_id" dynamodbav:"domain_id"` UserID string `json:"user_id" dynamodbav:"user_id"` RoleName string `json:"role_name" dynamodbav:"role_name"` CreatedAt timestamp.Timestamp `json:"created_at" dynamodbav:"created_at"` UpdatedAt timestamp.Timestamp `json:"updated_at" dynamodbav:"updated_at"` }
*
- entity
func NewUserRole ¶
func NewUserRole() *UserRole
func (*UserRole) MarshalDynamoAV ¶
func (userRole *UserRole) MarshalDynamoAV() (map[string]ddbTypes.AttributeValue, error)
func (*UserRole) Role ¶
func (userRole *UserRole) Role() permissions.Role
func (*UserRole) UnmarshalDynamoAV ¶
func (userRole *UserRole) UnmarshalDynamoAV(item map[string]ddbTypes.AttributeValue) error
type UserRoles ¶
type UserRoles []*UserRole
*
- slice of entities
func (*UserRoles) FindByDomainID ¶
func (*UserRoles) FindByUserID ¶
func (*UserRoles) UnmarshalDynamoAV ¶
func (userRoles *UserRoles) UnmarshalDynamoAV(items []map[string]ddbTypes.AttributeValue) error
type Users ¶
type Users []*User
*
- slice of entities
func (*Users) UnmarshalDynamoAV ¶
func (users *Users) UnmarshalDynamoAV(items []map[string]ddbTypes.AttributeValue) error
Click to show internal directories.
Click to hide internal directories.