Versions in this module Expand all Collapse all v1 v1.1.0 May 13, 2022 Changes in this version + const RoleInit + type Condition map[string]interface + func (c *Condition) Scan(data interface{}) error + func (c Condition) Value() (driver.Value, error) + type Config map[string]interface + func (p *Config) Scan(data interface{}) error + func (p Config) Value() (driver.Value, error) + type FiledPermit map[string]Key + func (p *FiledPermit) Scan(data interface{}) error + func (p FiledPermit) Value() (driver.Value, error) + type Filters []string + func (p *Filters) Scan(data interface{}) error + func (p Filters) Value() (driver.Value, error) + type Key struct + Properties FiledPermit + Type string + type Limits struct + Condition Condition + Name string + Params FiledPermit + ParamsAll bool + Path string + Response FiledPermit + ResponseAll bool + type LimitsRepo interface + CreatePerMatch func(ctx context.Context, match *UserRoles) error + CreatePermit func(ctx context.Context, roleID string, limits ...*Limits) error + DeletePerMatch func(ctx context.Context, appID string) error + DeletePermit func(ctx context.Context, roleID string) error + DeletePermitByPath func(ctx context.Context, roleID, path string) error + ExistsKey func(ctx context.Context, key string) bool + GetPerMatch func(ctx context.Context, appID, userID string) (*UserRoles, error) + GetPermit func(ctx context.Context, roleID, path string) (*Limits, error) + Lock func(ctx context.Context, key string, val interface{}, ttl time.Duration) (bool, error) + PerMatchExpire func(ctx context.Context, key string, ttl time.Duration) error + PermitExpire func(ctx context.Context, key string, ttl time.Duration) error + UnLock func(ctx context.Context, key string) error + type Permit struct + Condition Condition + CreatedAt int64 + CreatorID string + CreatorName string + ID string + Method string + Params FiledPermit + ParamsAll bool + Path string + Response FiledPermit + ResponseAll bool + RoleID string + type PermitQuery struct + ID string + Method string + Path string + Paths []string + RoleID string + RoleIDs []string + type PermitRepo interface + BatchCreate func(db *gorm.DB, form ...*Permit) error + Delete func(db *gorm.DB, query *PermitQuery) error + Get func(db *gorm.DB, roleID, path, method string) (*Permit, error) + List func(db *gorm.DB, query *PermitQuery, page, size int) ([]*Permit, int64, error) + Update func(db *gorm.DB, query *PermitQuery, permit *Permit) error + type Role struct + AppID string + CreatedAt int64 + CreatorID string + CreatorName string + Description string + ID string + Name string + Types RoleType + type RoleGrant struct + AppID string + CreatedAt int64 + ID string + Owner string + OwnerName string + RoleID string + Types int + type RoleGrantQuery struct + AppID string + Owners []string + RoleID string + RoleIDs []string + Types int + type RoleQuery struct + AppID string + ID string + Name string + RoleIDS []string + Types RoleType + type RoleRantRepo interface + BatchCreate func(db *gorm.DB, roleGrant ...*RoleGrant) error + Delete func(db *gorm.DB, query *RoleGrantQuery) error + Get func(db *gorm.DB, id string) (*RoleGrant, error) + List func(db *gorm.DB, query *RoleGrantQuery, page, size int) ([]*RoleGrant, int64, error) + Update func(db *gorm.DB, id string, roleGrant *RoleGrant) error + type RoleRepo interface + BatchCreate func(db *gorm.DB, role ...*Role) error + Delete func(db *gorm.DB, query *RoleQuery) error + Get func(db *gorm.DB, id string) (*Role, error) + List func(db *gorm.DB, query *RoleQuery, page, size int) ([]*Role, int64, error) + Update func(db *gorm.DB, id string, role *Role) error + type RoleType int64 + const CreateType + const InitType + type SchemaProperties map[string]SchemaProps + func (p *SchemaProperties) Scan(data interface{}) error + func (p SchemaProperties) Value() (driver.Value, error) + type SchemaProps struct + Items *SchemaProps + Length int + Properties SchemaProperties + ReadOnly bool + Required bool + Title string + Type string + type SerialExcute struct + Date string + Incr string + type SerialRepo interface + Create func(ctx context.Context, appID, tableID, fieldID string, ...) error + Get func(ctx context.Context, appID, tableID, fieldID, field string) string + GetAll func(ctx context.Context, appID, tableID, fieldID string) map[string]string + type SerialScheme struct + Bit string + Date string + Step string + Value string + type SourceType int64 + const FormSource + type Table struct + AppID string + Config Config + CreatedAt int64 + ID string + Schema WebSchema + TableID string + type TableQuery struct + AppID string + TableID string + TableIDS []string + type TableRelation struct + AppID string + CreatedAt int64 + FieldName string + Filter Filters + ID string + SubTableID string + SubTableType string + TableID string + type TableRelationQuery struct + AppID string + FieldName string + SubTableID string + SubTableType string + TableID string + type TableRelationRepo interface + BatchCreate func(db *gorm.DB, table ...*TableRelation) error + Delete func(db *gorm.DB, query *TableRelationQuery) error + Find func(db *gorm.DB, query *TableRelationQuery) ([]*TableRelation, error) + Get func(db *gorm.DB, tableID, fieldName string) (*TableRelation, error) + List func(db *gorm.DB, query *TableRelationQuery, page, size int) ([]*TableRelation, int64, error) + Update func(db *gorm.DB, tableID, fieldName string, table *TableRelation) error + type TableRepo interface + BatchCreate func(db *gorm.DB, tables ...*Table) error + Delete func(db *gorm.DB, query *TableQuery) error + Find func(db *gorm.DB, query *TableQuery) ([]*Table, error) + Get func(db *gorm.DB, appId, tableID string) (*Table, error) + List func(db *gorm.DB, query *TableQuery, page, size int) ([]*Table, int64, error) + Update func(db *gorm.DB, appID, tableID string, table *Table) error + type TableSchema struct + AppID string + CreatedAt int64 + CreatorID string + CreatorName string + Description string + EditorID string + EditorName string + FieldLen int64 + ID string + Schema SchemaProperties + Source SourceType + TableID string + Title string + UpdatedAt int64 + type TableSchemaQuery struct + AppID string + SourceType SourceType + TableID string + Title string + type TableSchemeRepo interface + BatchCreate func(db *gorm.DB, schema ...*TableSchema) error + Delete func(db *gorm.DB, query *TableSchemaQuery) error + Get func(db *gorm.DB, appID, tableID string) (*TableSchema, error) + List func(db *gorm.DB, query *TableSchemaQuery, page, size int) ([]*TableSchema, int64, error) + Update func(db *gorm.DB, appID, tableID string, baseSchema *TableSchema) error + type UserRole struct + AppID string + ID string + RoleID string + UserID string + type UserRoleQuery struct + AppID string + RoleID string + UserID string + UserIDS []string + type UserRoleRepo interface + BatchCreate func(db *gorm.DB, userRole ...*UserRole) error + Delete func(db *gorm.DB, query *UserRoleQuery) error + Get func(db *gorm.DB, appID, userID string) (*UserRole, error) + List func(db *gorm.DB, query *UserRoleQuery, page, size int) ([]*UserRole, int64, error) + type UserRoles struct + AppID string + RoleID string + UserID string + type WebSchema map[string]interface + func (p *WebSchema) Scan(data interface{}) error + func (p WebSchema) Value() (driver.Value, error)