Documentation
¶
Index ¶
- Constants
- func ResolveDisplayNameByPayload(data interface{}) (string, error)
- type Action
- type ActionRepository
- type ActionRepositoryImpl
- func (impl *ActionRepositoryImpl) Create(action *Action) (int, error)
- func (impl *ActionRepositoryImpl) Delete(id int) error
- func (impl *ActionRepositoryImpl) DeleteActionsByApp(appID int) error
- func (impl *ActionRepositoryImpl) RetrieveActionsByAppVersion(app, version int) ([]*Action, error)
- func (impl *ActionRepositoryImpl) RetrieveByID(id int) (*Action, error)
- func (impl *ActionRepositoryImpl) Update(action *Action) error
- type App
- type AppRepository
- type AppRepositoryImpl
- func (impl *AppRepositoryImpl) Create(app *App) (int, error)
- func (impl *AppRepositoryImpl) Delete(appID int) error
- func (impl *AppRepositoryImpl) RetrieveAll() ([]*App, error)
- func (impl *AppRepositoryImpl) RetrieveAllByUpdatedTime() ([]*App, error)
- func (impl *AppRepositoryImpl) RetrieveAppByID(id int) (*App, error)
- func (impl *AppRepositoryImpl) Update(app *App) error
- func (impl *AppRepositoryImpl) UpdateUpdatedAt(app *App) error
- type ComponentNode
- type ComponentStateForUpdate
- type DisplayNameState
- type DisplayNameStateForUpdate
- type KVState
- type KVStateRepository
- type KVStateRepositoryImpl
- func (impl *KVStateRepositoryImpl) Create(kvstate *KVState) error
- func (impl *KVStateRepositoryImpl) Delete(kvstateID int) error
- func (impl *KVStateRepositoryImpl) DeleteAllKVStatesByAppVersionAndType(apprefid int, version int, stateType int) error
- func (impl *KVStateRepositoryImpl) DeleteAllTypeKVStatesByApp(apprefid int) error
- func (impl *KVStateRepositoryImpl) RetrieveAllTypeKVStatesByApp(apprefid int, version int) ([]*KVState, error)
- func (impl *KVStateRepositoryImpl) RetrieveByID(kvstateID int) (*KVState, error)
- func (impl *KVStateRepositoryImpl) RetrieveEditVersionByAppAndKey(apprefid int, statetype int, key string) (*KVState, error)
- func (impl *KVStateRepositoryImpl) RetrieveKVStatesByApp(apprefid int, statetype int, version int) ([]*KVState, error)
- func (impl *KVStateRepositoryImpl) RetrieveKVStatesByKey(key string) ([]*KVState, error)
- func (impl *KVStateRepositoryImpl) RetrieveKVStatesByVersion(version int) ([]*KVState, error)
- func (impl *KVStateRepositoryImpl) Update(kvstate *KVState) error
- type Resource
- type ResourceRepository
- type ResourceRepositoryImpl
- func (impl *ResourceRepositoryImpl) Create(resource *Resource) (int, error)
- func (impl *ResourceRepositoryImpl) Delete(id int) error
- func (impl *ResourceRepositoryImpl) RetrieveAll() ([]*Resource, error)
- func (impl *ResourceRepositoryImpl) RetrieveAllByUpdatedTime() ([]*Resource, error)
- func (impl *ResourceRepositoryImpl) RetrieveByID(id int) (*Resource, error)
- func (impl *ResourceRepositoryImpl) Update(resource *Resource) error
- type SetState
- type SetStateRepository
- type SetStateRepositoryImpl
- func (impl *SetStateRepositoryImpl) Create(setState *SetState) error
- func (impl *SetStateRepositoryImpl) Delete(setStateID int) error
- func (impl *SetStateRepositoryImpl) DeleteAllTypeSetStatesByApp(apprefid int) error
- func (impl *SetStateRepositoryImpl) DeleteByValue(setState *SetState) error
- func (impl *SetStateRepositoryImpl) RetrieveByID(setStateID int) (*SetState, error)
- func (impl *SetStateRepositoryImpl) RetrieveByValue(setState *SetState) (*SetState, error)
- func (impl *SetStateRepositoryImpl) RetrieveSetStatesByApp(apprefid int, statetype int, version int) ([]*SetState, error)
- func (impl *SetStateRepositoryImpl) RetrieveSetStatesByVersion(version int) ([]*SetState, error)
- func (impl *SetStateRepositoryImpl) Update(setState *SetState) error
- func (impl *SetStateRepositoryImpl) UpdateByValue(beforeSetState *SetState, afterSetState *SetState) error
- type TreeState
- type TreeStateRepository
- type TreeStateRepositoryImpl
- func (impl *TreeStateRepositoryImpl) Create(treestate *TreeState) (int, error)
- func (impl *TreeStateRepositoryImpl) Delete(treestateID int) error
- func (impl *TreeStateRepositoryImpl) DeleteAllTypeTreeStatesByApp(apprefid int) error
- func (impl *TreeStateRepositoryImpl) RetrieveAllTypeTreeStatesByApp(apprefid int, version int) ([]*TreeState, error)
- func (impl *TreeStateRepositoryImpl) RetrieveByID(treestateID int) (*TreeState, error)
- func (impl *TreeStateRepositoryImpl) RetrieveEditVersionByAppAndName(apprefid int, statetype int, name string) (*TreeState, error)
- func (impl *TreeStateRepositoryImpl) RetrieveTreeStatesByApp(apprefid int, statetype int, version int) ([]*TreeState, error)
- func (impl *TreeStateRepositoryImpl) RetrieveTreeStatesByName(name string) ([]*TreeState, error)
- func (impl *TreeStateRepositoryImpl) RetrieveTreeStatesByVersion(version int) ([]*TreeState, error)
- func (impl *TreeStateRepositoryImpl) Update(treestate *TreeState) error
- type User
- type UserRepository
- type UserRepositoryImpl
- func (impl *UserRepositoryImpl) CreateUser(user *User) (int, error)
- func (impl *UserRepositoryImpl) FetchUserByEmail(email string) (*User, error)
- func (impl *UserRepositoryImpl) FetchUserByUKey(id int, uid uuid.UUID) (*User, error)
- func (impl *UserRepositoryImpl) RetrieveByID(id int) (*User, error)
- func (impl *UserRepositoryImpl) UpdateUser(user *User) error
Constants ¶
View Source
const APP_EDIT_VERSION = 0 // the editable version app ID always be 0
View Source
const KV_STATE_TYPE_DEPENDENCIES = 2 // DependenciesState
View Source
const KV_STATE_TYPE_DOTTED_LINE_SQUARE = 4 // DottedLineSquareState
View Source
const KV_STATE_TYPE_DRAG_SHADOW = 3 // DragShadowState
View Source
const SET_STATE_TYPE_DISPLAY_NAME = 5 // DisplayNameState
View Source
const STATE_TYPE_INVALIED = 0
define StateType
View Source
const TREE_STATE_SUMMIT_ID = 0
View Source
const TREE_STATE_SUMMIT_NAME = "root"
View Source
const TREE_STATE_TYPE_COMPONENTS = 1 // ComponentsState
View Source
const USER_DEFAULT_AVATAR = ""
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct {
ID int `gorm:"column:id;type:bigserial;primary_key"`
App int `gorm:"column:app_ref_id;type:bigint;not null"`
Version int `gorm:"column:version;type:bigint;not null"`
Resource int `gorm:"column:resource_ref_id;type:bigint;not null"`
Name string `gorm:"column:name;type:varchar;size:255;not null"`
Type int `gorm:"column:type;type:smallint;not null"`
TriggerMode string `gorm:"column:trigger_mode;type:varchar;size:16;not null"`
Transformer db.JSONB `gorm:"column:transformer;type:jsonb"`
Template db.JSONB `gorm:"column:template;type:jsonb"`
CreatedAt time.Time `gorm:"column:created_at;type:timestamp;not null"`
CreatedBy int `gorm:"column:created_by;type:bigint;not null"`
UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;not null"`
UpdatedBy int `gorm:"column:updated_by;type:bigint;not null"`
}
type ActionRepository ¶
type ActionRepositoryImpl ¶
type ActionRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewActionRepositoryImpl ¶
func NewActionRepositoryImpl(logger *zap.SugaredLogger, db *gorm.DB) *ActionRepositoryImpl
func (*ActionRepositoryImpl) Create ¶
func (impl *ActionRepositoryImpl) Create(action *Action) (int, error)
func (*ActionRepositoryImpl) Delete ¶
func (impl *ActionRepositoryImpl) Delete(id int) error
func (*ActionRepositoryImpl) DeleteActionsByApp ¶
func (impl *ActionRepositoryImpl) DeleteActionsByApp(appID int) error
func (*ActionRepositoryImpl) RetrieveActionsByAppVersion ¶
func (impl *ActionRepositoryImpl) RetrieveActionsByAppVersion(app, version int) ([]*Action, error)
func (*ActionRepositoryImpl) RetrieveByID ¶
func (impl *ActionRepositoryImpl) RetrieveByID(id int) (*Action, error)
func (*ActionRepositoryImpl) Update ¶
func (impl *ActionRepositoryImpl) Update(action *Action) error
type App ¶
type App struct {
ID int `json:"id" gorm:"column:id;type:uuid;default:uuid_generate_v4();primary_key;unique"`
Name string `json:"name" gorm:"column:name;type:varchar"`
ReleaseVersion int `json:"release_version" gorm:"column:release_version;type:uuid"`
MainlineVersion int `json:"mainline_version" gorm:"column:mainline_version;type:uuid"`
CreatedAt time.Time `json:"created_at" gorm:"column:created_at;type:timestamp"`
CreatedBy int `json:"created_by" gorm:"column:created_by;type:uuid"`
UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at;type:timestamp"`
UpdatedBy int `json:"updated_by" gorm:"column:updated_by;type:uuid"`
}
type AppRepository ¶
type AppRepositoryImpl ¶
type AppRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewAppRepositoryImpl ¶
func NewAppRepositoryImpl(logger *zap.SugaredLogger, db *gorm.DB) *AppRepositoryImpl
func (*AppRepositoryImpl) Delete ¶
func (impl *AppRepositoryImpl) Delete(appID int) error
func (*AppRepositoryImpl) RetrieveAll ¶
func (impl *AppRepositoryImpl) RetrieveAll() ([]*App, error)
func (*AppRepositoryImpl) RetrieveAllByUpdatedTime ¶
func (impl *AppRepositoryImpl) RetrieveAllByUpdatedTime() ([]*App, error)
func (*AppRepositoryImpl) RetrieveAppByID ¶
func (impl *AppRepositoryImpl) RetrieveAppByID(id int) (*App, error)
func (*AppRepositoryImpl) Update ¶
func (impl *AppRepositoryImpl) Update(app *App) error
func (*AppRepositoryImpl) UpdateUpdatedAt ¶
func (impl *AppRepositoryImpl) UpdateUpdatedAt(app *App) error
type ComponentNode ¶
type ComponentNode struct {
DisplayName string `json:"displayName"`
ParentNode string `json:"parentNode"`
ShowName string `json:"showName"`
Error bool `json:"error"`
IsDragging bool `json:"isDragging"`
ChildrenNode []*ComponentNode `json:"childrenNode"`
Type string `json:"type"`
ContainerType string `json:"containerType"`
VerticalResize bool `json:"verticalResize"`
H float64 `json:"h"`
W float64 `json:"w"`
MinH float64 `json:"minH"`
MinW float64 `json:"minW"`
UnitW float64 `json:"unitW"`
UnitH float64 `json:"unitH"`
X float64 `json:"x"`
Y float64 `json:"y"`
Z float64 `json:"z"`
Props map[string]interface{} `json:"props"`
PanelConfig map[string]interface{} `json:"panelConfig"`
}
func BuildComponentTree ¶
func BuildComponentTree(treeState *TreeState, treeStateMap map[int]*TreeState, parentComponentNode *ComponentNode) (*ComponentNode, error)
func ConstructComponentNodeByMap ¶
func ConstructComponentNodeByMap(data interface{}) *ComponentNode
func NewComponentNode ¶
func NewComponentNode() *ComponentNode
func NewComponentNodeFromJSON ¶
func NewComponentNodeFromJSON(cnodebyte []byte) (*ComponentNode, error)
func (*ComponentNode) AppendChildrenNode ¶
func (cnode *ComponentNode) AppendChildrenNode(node *ComponentNode)
func (*ComponentNode) Serialization ¶
func (cnode *ComponentNode) Serialization() ([]byte, error)
func (*ComponentNode) SerializationForDatabase ¶
func (cnode *ComponentNode) SerializationForDatabase() ([]byte, error)
func (*ComponentNode) UpdateParentNode ¶
func (cnode *ComponentNode) UpdateParentNode(parentComponentNode *ComponentNode)
type ComponentStateForUpdate ¶
type ComponentStateForUpdate struct {
Before interface{} `json:"before"`
After interface{} `json:"after"`
}
func ConstructComponentStateForUpdateByPayload ¶
func ConstructComponentStateForUpdateByPayload(data interface{}) (*ComponentStateForUpdate, error)
type DisplayNameState ¶
type DisplayNameState []string
func ResolveDisplayNameStateByPayload ¶
func ResolveDisplayNameStateByPayload(data interface{}) (DisplayNameState, error)
type DisplayNameStateForUpdate ¶
func ConstructDisplayNameStateForUpdateByPayload ¶
func ConstructDisplayNameStateForUpdateByPayload(data interface{}) (*DisplayNameStateForUpdate, error)
type KVState ¶
type KVState struct {
ID int `json:"id" gorm:"column:id;type:bigserial"`
StateType int `json:"state_type" gorm:"column:state_type;type:bigint"`
AppRefID int `json:"app_ref_id" gorm:"column:app_ref_id;type:bigint"`
Version int `json:"version" gorm:"column:version;type:bigint"`
Key string `json:"key" gorm:"column:key;type:text"`
Value string `json:"value" gorm:"column:value;type:jsonb"`
CreatedAt time.Time `json:"created_at" gorm:"column:created_at;type:timestamp"`
CreatedBy int `json:"created_by" gorm:"column:created_by;type:bigint"`
UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at;type:timestamp"`
UpdatedBy int `json:"updated_by" gorm:"column:updated_by;type:bigint"`
}
type KVStateRepository ¶
type KVStateRepository interface {
Create(kvstate *KVState) error
Delete(kvstateID int) error
Update(kvstate *KVState) error
RetrieveByID(kvstateID int) (*KVState, error)
RetrieveKVStatesByVersion(versionID int) ([]*KVState, error)
RetrieveKVStatesByKey(key string) ([]*KVState, error)
RetrieveKVStatesByApp(apprefid int, statetype int, version int) ([]*KVState, error)
RetrieveEditVersionByAppAndKey(apprefid int, statetype int, key string) (*KVState, error)
RetrieveAllTypeKVStatesByApp(apprefid int, version int) ([]*KVState, error)
DeleteAllTypeKVStatesByApp(apprefid int) error
DeleteAllKVStatesByAppVersionAndType(apprefid int, version int, stateType int) error
}
type KVStateRepositoryImpl ¶
type KVStateRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewKVStateRepositoryImpl ¶
func NewKVStateRepositoryImpl(logger *zap.SugaredLogger, db *gorm.DB) *KVStateRepositoryImpl
func (*KVStateRepositoryImpl) Create ¶
func (impl *KVStateRepositoryImpl) Create(kvstate *KVState) error
func (*KVStateRepositoryImpl) Delete ¶
func (impl *KVStateRepositoryImpl) Delete(kvstateID int) error
func (*KVStateRepositoryImpl) DeleteAllKVStatesByAppVersionAndType ¶
func (impl *KVStateRepositoryImpl) DeleteAllKVStatesByAppVersionAndType(apprefid int, version int, stateType int) error
func (*KVStateRepositoryImpl) DeleteAllTypeKVStatesByApp ¶
func (impl *KVStateRepositoryImpl) DeleteAllTypeKVStatesByApp(apprefid int) error
func (*KVStateRepositoryImpl) RetrieveAllTypeKVStatesByApp ¶
func (impl *KVStateRepositoryImpl) RetrieveAllTypeKVStatesByApp(apprefid int, version int) ([]*KVState, error)
func (*KVStateRepositoryImpl) RetrieveByID ¶
func (impl *KVStateRepositoryImpl) RetrieveByID(kvstateID int) (*KVState, error)
func (*KVStateRepositoryImpl) RetrieveEditVersionByAppAndKey ¶
func (*KVStateRepositoryImpl) RetrieveKVStatesByApp ¶
func (*KVStateRepositoryImpl) RetrieveKVStatesByKey ¶
func (impl *KVStateRepositoryImpl) RetrieveKVStatesByKey(key string) ([]*KVState, error)
func (*KVStateRepositoryImpl) RetrieveKVStatesByVersion ¶
func (impl *KVStateRepositoryImpl) RetrieveKVStatesByVersion(version int) ([]*KVState, error)
func (*KVStateRepositoryImpl) Update ¶
func (impl *KVStateRepositoryImpl) Update(kvstate *KVState) error
type Resource ¶
type Resource struct {
ID int `gorm:"column:id;type:bigserial;primary_key"`
Name string `gorm:"column:name;type:varchar;size:200;not null"`
Type int `gorm:"column:type;type:smallint;not null"`
Options db.JSONB `gorm:"column:options;type:jsonb"`
CreatedAt time.Time `gorm:"column:created_at;type:timestamp;not null"`
CreatedBy int `gorm:"column:created_by;type:bigint;not null"`
UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;not null"`
UpdatedBy int `gorm:"column:updated_by;type:bigint;not null"`
}
type ResourceRepository ¶
type ResourceRepositoryImpl ¶
type ResourceRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewResourceRepositoryImpl ¶
func NewResourceRepositoryImpl(logger *zap.SugaredLogger, db *gorm.DB) *ResourceRepositoryImpl
func (*ResourceRepositoryImpl) Create ¶
func (impl *ResourceRepositoryImpl) Create(resource *Resource) (int, error)
func (*ResourceRepositoryImpl) Delete ¶
func (impl *ResourceRepositoryImpl) Delete(id int) error
func (*ResourceRepositoryImpl) RetrieveAll ¶
func (impl *ResourceRepositoryImpl) RetrieveAll() ([]*Resource, error)
func (*ResourceRepositoryImpl) RetrieveAllByUpdatedTime ¶
func (impl *ResourceRepositoryImpl) RetrieveAllByUpdatedTime() ([]*Resource, error)
func (*ResourceRepositoryImpl) RetrieveByID ¶
func (impl *ResourceRepositoryImpl) RetrieveByID(id int) (*Resource, error)
func (*ResourceRepositoryImpl) Update ¶
func (impl *ResourceRepositoryImpl) Update(resource *Resource) error
type SetState ¶
type SetState struct {
ID int `json:"id" gorm:"column:id;type:bigserial"`
StateType int `json:"state_type" gorm:"column:state_type;type:bigint"`
AppRefID int `json:"app_ref_id" gorm:"column:app_ref_id;type:bigint"`
Version int `json:"version" gorm:"column:version;type:bigint"`
Value string `json:"value" gorm:"column:value;type:text"`
CreatedAt time.Time `json:"created_at" gorm:"column:created_at;type:timestamp"`
CreatedBy int `json:"created_by" gorm:"column:created_by;type:bigint"`
UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at;type:timestamp"`
UpdatedBy int `json:"updated_by" gorm:"column:updated_by;type:bigint"`
}
type SetStateRepository ¶
type SetStateRepository interface {
Create(setState *SetState) error
Delete(setStateID int) error
DeleteByValue(setState *SetState) error
Update(setState *SetState) error
UpdateByValue(beforeSetState *SetState, afterSetState *SetState) error
RetrieveByID(setStateID int) (*SetState, error)
RetrieveSetStatesByVersion(version int) ([]*SetState, error)
RetrieveByValue(setState *SetState) (*SetState, error)
RetrieveSetStatesByApp(apprefid int, statetype int, version int) ([]*SetState, error)
DeleteAllTypeSetStatesByApp(apprefid int) error
}
type SetStateRepositoryImpl ¶
type SetStateRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewSetStateRepositoryImpl ¶
func NewSetStateRepositoryImpl(logger *zap.SugaredLogger, db *gorm.DB) *SetStateRepositoryImpl
func (*SetStateRepositoryImpl) Create ¶
func (impl *SetStateRepositoryImpl) Create(setState *SetState) error
func (*SetStateRepositoryImpl) Delete ¶
func (impl *SetStateRepositoryImpl) Delete(setStateID int) error
func (*SetStateRepositoryImpl) DeleteAllTypeSetStatesByApp ¶
func (impl *SetStateRepositoryImpl) DeleteAllTypeSetStatesByApp(apprefid int) error
func (*SetStateRepositoryImpl) DeleteByValue ¶
func (impl *SetStateRepositoryImpl) DeleteByValue(setState *SetState) error
func (*SetStateRepositoryImpl) RetrieveByID ¶
func (impl *SetStateRepositoryImpl) RetrieveByID(setStateID int) (*SetState, error)
func (*SetStateRepositoryImpl) RetrieveByValue ¶
func (impl *SetStateRepositoryImpl) RetrieveByValue(setState *SetState) (*SetState, error)
func (*SetStateRepositoryImpl) RetrieveSetStatesByApp ¶
func (*SetStateRepositoryImpl) RetrieveSetStatesByVersion ¶
func (impl *SetStateRepositoryImpl) RetrieveSetStatesByVersion(version int) ([]*SetState, error)
func (*SetStateRepositoryImpl) Update ¶
func (impl *SetStateRepositoryImpl) Update(setState *SetState) error
func (*SetStateRepositoryImpl) UpdateByValue ¶
func (impl *SetStateRepositoryImpl) UpdateByValue(beforeSetState *SetState, afterSetState *SetState) error
type TreeState ¶
type TreeState struct {
ID int `json:"id" gorm:"column:id;type:bigserial"`
StateType int `json:"state_type" gorm:"column:state_type;type:bigint"`
ParentNodeRefID int `json:"parent_node_ref_id" gorm:"column:parent_node_ref_id;type:bigint"`
ChildrenNodeRefIDs string `json:"children_node_ref_ids" gorm:"column:children_node_ref_ids;type:jsonb"`
AppRefID int `json:"app_ref_id" gorm:"column:app_ref_id;type:bigint"`
Version int `json:"version" gorm:"column:version;type:bigint"`
Name string `json:"name" gorm:"column:name;type:text"`
Content string `json:"content" gorm:"column:content;type:jsonb"`
CreatedAt time.Time `json:"created_at" gorm:"column:created_at;type:timestamp"`
CreatedBy int `json:"created_by" gorm:"column:created_by;type:bigint"`
UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at;type:timestamp"`
UpdatedBy int `json:"updated_by" gorm:"column:updated_by;type:bigint"`
}
func NewTreeState ¶
func NewTreeState() *TreeState
func (*TreeState) AppendChildrenNodeRefIDs ¶
func (*TreeState) ExportChildrenNodeRefIDs ¶
func (*TreeState) ExportContentAsComponentState ¶
func (treeState *TreeState) ExportContentAsComponentState() (*ComponentNode, error)
func (*TreeState) RemoveChildrenNodeRefIDs ¶
type TreeStateRepository ¶
type TreeStateRepository interface {
Create(treestate *TreeState) (int, error)
Delete(treestateID int) error
Update(treestate *TreeState) error
RetrieveByID(treestateID int) (*TreeState, error)
RetrieveTreeStatesByVersion(versionID int) ([]*TreeState, error)
RetrieveTreeStatesByName(name string) ([]*TreeState, error)
RetrieveTreeStatesByApp(apprefid int, statetype int, version int) ([]*TreeState, error)
RetrieveEditVersionByAppAndName(apprefid int, statetype int, name string) (*TreeState, error)
RetrieveAllTypeTreeStatesByApp(apprefid int, version int) ([]*TreeState, error)
DeleteAllTypeTreeStatesByApp(apprefid int) error
}
type TreeStateRepositoryImpl ¶
type TreeStateRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewTreeStateRepositoryImpl ¶
func NewTreeStateRepositoryImpl(logger *zap.SugaredLogger, db *gorm.DB) *TreeStateRepositoryImpl
func (*TreeStateRepositoryImpl) Create ¶
func (impl *TreeStateRepositoryImpl) Create(treestate *TreeState) (int, error)
func (*TreeStateRepositoryImpl) Delete ¶
func (impl *TreeStateRepositoryImpl) Delete(treestateID int) error
func (*TreeStateRepositoryImpl) DeleteAllTypeTreeStatesByApp ¶
func (impl *TreeStateRepositoryImpl) DeleteAllTypeTreeStatesByApp(apprefid int) error
func (*TreeStateRepositoryImpl) RetrieveAllTypeTreeStatesByApp ¶
func (impl *TreeStateRepositoryImpl) RetrieveAllTypeTreeStatesByApp(apprefid int, version int) ([]*TreeState, error)
func (*TreeStateRepositoryImpl) RetrieveByID ¶
func (impl *TreeStateRepositoryImpl) RetrieveByID(treestateID int) (*TreeState, error)
func (*TreeStateRepositoryImpl) RetrieveEditVersionByAppAndName ¶
func (*TreeStateRepositoryImpl) RetrieveTreeStatesByApp ¶
func (*TreeStateRepositoryImpl) RetrieveTreeStatesByName ¶
func (impl *TreeStateRepositoryImpl) RetrieveTreeStatesByName(name string) ([]*TreeState, error)
func (*TreeStateRepositoryImpl) RetrieveTreeStatesByVersion ¶
func (impl *TreeStateRepositoryImpl) RetrieveTreeStatesByVersion(version int) ([]*TreeState, error)
func (*TreeStateRepositoryImpl) Update ¶
func (impl *TreeStateRepositoryImpl) Update(treestate *TreeState) error
type User ¶
type User struct {
ID int `gorm:"column:id;type:bigserial;primary_key;index:users_ukey"`
UID uuid.UUID `gorm:"column:uid;type:uuid;not null;index:users_ukey"`
Nickname string `gorm:"column:nickname;type:varchar;size:15;not null"`
PasswordDigest string `gorm:"column:password_digest;type:varchar;size:60;not null"`
Email string `gorm:"column:email;type:varchar;size:255;not null"`
Language int `gorm:"column:language;type:smallint;not null"`
IsSubscribed bool `gorm:"column:is_subscribed;type:boolean;default:false;not null"`
CreatedAt time.Time `gorm:"column:created_at;type:timestamp"`
UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp"`
}
type UserRepository ¶
type UserRepositoryImpl ¶
type UserRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewUserRepositoryImpl ¶
func NewUserRepositoryImpl(db *gorm.DB, logger *zap.SugaredLogger) *UserRepositoryImpl
func (*UserRepositoryImpl) CreateUser ¶
func (impl *UserRepositoryImpl) CreateUser(user *User) (int, error)
func (*UserRepositoryImpl) FetchUserByEmail ¶
func (impl *UserRepositoryImpl) FetchUserByEmail(email string) (*User, error)
func (*UserRepositoryImpl) FetchUserByUKey ¶
func (*UserRepositoryImpl) RetrieveByID ¶
func (impl *UserRepositoryImpl) RetrieveByID(id int) (*User, error)
func (*UserRepositoryImpl) UpdateUser ¶
func (impl *UserRepositoryImpl) UpdateUser(user *User) error
Click to show internal directories.
Click to hide internal directories.