Documentation
¶
Index ¶
- Variables
- func BindRpcFunction(rpc raiden.Rpc, fn *objects.Function) (err error)
- func BindToSupabaseRole(r *objects.Role, role raiden.Role)
- func BindToSupabaseStorage(s *objects.Bucket, storage raiden.Bucket)
- func BindToSupabaseType(r *objects.Type, role raiden.Type)
- func BuildRoleFromState(rs RoleState, role raiden.Role) (r objects.Role)
- func BuildTypeFromState(ts TypeState, t raiden.Type) (r objects.Type)
- func CreateTmpState(stateFile string) string
- func GetStateFilePath() (path string, err error)
- func RestoreFromTmp(tmpFile string)
- func Save(state *State) error
- type ExtractRoleResult
- type ExtractRpcResult
- type ExtractStorageItem
- type ExtractStorageResult
- type ExtractTableItem
- type ExtractTableItems
- type ExtractTableResult
- type ExtractTypeResult
- type ExtractedPolicies
- type JoinRelation
- type LocalState
- func (s *LocalState) AddRole(role RoleState)
- func (s *LocalState) AddRpc(rpc RpcState)
- func (s *LocalState) AddStorage(storage StorageState)
- func (s *LocalState) AddTable(table TableState)
- func (s *LocalState) AddType(t TypeState)
- func (s *LocalState) DeleteRole(roleId int)
- func (s *LocalState) DeleteRpc(rpcId int)
- func (s *LocalState) DeleteStorage(storageId string)
- func (s *LocalState) DeleteTable(tableId int)
- func (s *LocalState) DeleteType(typeId int)
- func (s *LocalState) FindRole(roleId int) (index int, roleState RoleState, found bool)
- func (s *LocalState) FindRpc(rpcId int) (index int, rpcState RpcState, found bool)
- func (s *LocalState) FindStorage(storageId string) (index int, storageState StorageState, found bool)
- func (s *LocalState) FindStorageByName(name string) (index int, storageState StorageState, found bool)
- func (s *LocalState) FindStorageByPermissionName(name string) (index int, storageState StorageState, found bool)
- func (s *LocalState) FindTable(tableId int) (index int, tableState TableState, found bool)
- func (s *LocalState) FindType(typeId int) (index int, tState TypeState, found bool)
- func (s *LocalState) Persist() error
- func (s *LocalState) UpdateRole(index int, state RoleState)
- func (s *LocalState) UpdateRpc(index int, state RpcState)
- func (s *LocalState) UpdateStorage(index int, state StorageState)
- func (s *LocalState) UpdateTable(index int, state TableState)
- func (s *LocalState) UpdateType(index int, state TypeState)
- type ModelValidationTag
- type Relation
- type RoleState
- type RpcState
- type State
- type StorageState
- type TableState
- type TypeState
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StateFileDir = "build" StateFileName = "state" )
View Source
var StateLogger = logger.HcLog().Named("raiden.state")
Functions ¶
func BindToSupabaseType ¶ added in v1.0.0
func BuildTypeFromState ¶ added in v1.0.0
func CreateTmpState ¶
func GetStateFilePath ¶
func RestoreFromTmp ¶
func RestoreFromTmp(tmpFile string)
Types ¶
type ExtractRoleResult ¶
func ExtractRole ¶
func (ExtractRoleResult) ToDeleteFlatMap ¶
func (er ExtractRoleResult) ToDeleteFlatMap() map[string]*objects.Role
type ExtractRpcResult ¶
type ExtractRpcResult struct {
Existing []objects.Function
New []objects.Function
Delete []objects.Function
}
func ExtractRpc ¶
func ExtractRpc(rpcState []RpcState, appRpc []raiden.Rpc) (result ExtractRpcResult, err error)
func (ExtractRpcResult) ToDeleteFlatMap ¶
func (er ExtractRpcResult) ToDeleteFlatMap() map[string]*objects.Function
type ExtractStorageItem ¶
type ExtractStorageItem struct {
Storage objects.Bucket
ExtractedPolicies ExtractedPolicies
}
func BuildStorageFromApp ¶
func BuildStorageFromApp(storage raiden.Bucket) (si ExtractStorageItem)
func BuildStorageFromState ¶
func BuildStorageFromState(ss StorageState, storage raiden.Bucket) (si ExtractStorageItem)
type ExtractStorageResult ¶
type ExtractStorageResult struct {
Existing []ExtractStorageItem
New []ExtractStorageItem
Delete []ExtractStorageItem
}
func ExtractStorage ¶
func ExtractStorage(storageStates []StorageState, appStorages []raiden.Bucket) (result ExtractStorageResult, err error)
func (ExtractStorageResult) ToDeleteFlatMap ¶
func (er ExtractStorageResult) ToDeleteFlatMap() map[string]*objects.Bucket
type ExtractTableItem ¶
type ExtractTableItem struct {
Table objects.Table
ValidationTags ModelValidationTag
ExtractedPolicies ExtractedPolicies
}
type ExtractTableItems ¶
type ExtractTableItems []ExtractTableItem
func (ExtractTableItems) ToFlatTable ¶
func (f ExtractTableItems) ToFlatTable() (tables []objects.Table)
type ExtractTableResult ¶
type ExtractTableResult struct {
Existing ExtractTableItems
New ExtractTableItems
Delete ExtractTableItems
}
func ExtractTable ¶
func ExtractTable(tableStates []TableState, appTable []any, mapDataType map[string]objects.Type) (result ExtractTableResult, err error)
func (ExtractTableResult) ToDeleteFlatMap ¶
func (f ExtractTableResult) ToDeleteFlatMap() map[string]*objects.Table
type ExtractTypeResult ¶ added in v1.0.0
func ExtractType ¶ added in v1.0.0
func ExtractType(typeStates []TypeState, appTypes []raiden.Type) (result ExtractTypeResult, err error)
func (ExtractTypeResult) ToDeleteFlatMap ¶ added in v1.0.0
func (er ExtractTypeResult) ToDeleteFlatMap() map[string]*objects.Type
type ExtractedPolicies ¶
type JoinRelation ¶
type LocalState ¶
func (*LocalState) AddRole ¶
func (s *LocalState) AddRole(role RoleState)
func (*LocalState) AddRpc ¶
func (s *LocalState) AddRpc(rpc RpcState)
func (*LocalState) AddStorage ¶
func (s *LocalState) AddStorage(storage StorageState)
func (*LocalState) AddTable ¶
func (s *LocalState) AddTable(table TableState)
func (*LocalState) AddType ¶ added in v1.0.0
func (s *LocalState) AddType(t TypeState)
func (*LocalState) DeleteRole ¶
func (s *LocalState) DeleteRole(roleId int)
func (*LocalState) DeleteRpc ¶
func (s *LocalState) DeleteRpc(rpcId int)
func (*LocalState) DeleteStorage ¶
func (s *LocalState) DeleteStorage(storageId string)
func (*LocalState) DeleteTable ¶
func (s *LocalState) DeleteTable(tableId int)
func (*LocalState) DeleteType ¶ added in v1.0.0
func (s *LocalState) DeleteType(typeId int)
func (*LocalState) FindRole ¶
func (s *LocalState) FindRole(roleId int) (index int, roleState RoleState, found bool)
func (*LocalState) FindRpc ¶
func (s *LocalState) FindRpc(rpcId int) (index int, rpcState RpcState, found bool)
func (*LocalState) FindStorage ¶
func (s *LocalState) FindStorage(storageId string) (index int, storageState StorageState, found bool)
func (*LocalState) FindStorageByName ¶
func (s *LocalState) FindStorageByName(name string) (index int, storageState StorageState, found bool)
func (*LocalState) FindStorageByPermissionName ¶
func (s *LocalState) FindStorageByPermissionName(name string) (index int, storageState StorageState, found bool)
func (*LocalState) FindTable ¶
func (s *LocalState) FindTable(tableId int) (index int, tableState TableState, found bool)
func (*LocalState) FindType ¶ added in v1.0.0
func (s *LocalState) FindType(typeId int) (index int, tState TypeState, found bool)
func (*LocalState) Persist ¶
func (s *LocalState) Persist() error
func (*LocalState) UpdateRole ¶
func (s *LocalState) UpdateRole(index int, state RoleState)
func (*LocalState) UpdateRpc ¶
func (s *LocalState) UpdateRpc(index int, state RpcState)
func (*LocalState) UpdateStorage ¶
func (s *LocalState) UpdateStorage(index int, state StorageState)
func (*LocalState) UpdateTable ¶
func (s *LocalState) UpdateTable(index int, state TableState)
func (*LocalState) UpdateType ¶ added in v1.0.0
func (s *LocalState) UpdateType(index int, state TypeState)
type ModelValidationTag ¶
type Relation ¶
type Relation struct {
Table string
Type string
RelationType raiden.RelationType
PrimaryKey string
ForeignKey string
Tag string
*JoinRelation
Action *objects.TablesRelationshipAction
Index *objects.Index
}
type State ¶
type State struct {
Tables []TableState
Roles []RoleState
Rpc []RpcState
Storage []StorageState
Types []TypeState
}
type StorageState ¶
type TableState ¶
Click to show internal directories.
Click to hide internal directories.