Documentation ¶
Index ¶
- type Setting
- func SettingsCreate(cReg *components.Registry, ctx context.Context, in *settingspb.CreateRequest) (*Setting, error)
- func SettingsGet(cReg *components.Registry, ctx context.Context, ...) (*Setting, error)
- func SettingsList(cReg *components.Registry, ctx context.Context, ...) ([]Setting, error)
- func SettingsUpdate(cReg *components.Registry, ctx context.Context, ...) (*Setting, error)
- func SettingsUpsert(cReg *components.Registry, ctx context.Context, in *settingspb.UpsertRequest) (*Setting, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Setting ¶
type Setting struct { bun.BaseModel `bun:"settings,alias:s"` ID uuid.UUID `bun:"id,pk,type:uuid,default:uuid_generate_v4()" json:"id" yaml:"id"` OwnerID uuid.UUID `bun:"owner_id,type:uuid" json:"owner_id" yaml:"owner_id"` Service string `json:"service" yaml:"service"` Name string `json:"name" yaml:"name"` Content json.RawMessage `bun:"type:jsonb" json:"content" yaml:"content"` RolesRead []string `bun:"roles_read,array" json:"roles_read" yaml:"roles_read"` RolesUpdate []string `bun:"roles_update,array" json:"roles_update" yaml:"roles_update"` // Timestampable CreatedAt time.Time `bun:"created_at,nullzero,notnull,default:current_timestamp" json:"created_at" yaml:"created_at"` UpdatedAt bun.NullTime `bun:"updated_at" json:"updated_at" yaml:"updated_at"` // Softdelete DeletedAt bun.NullTime `bun:"deleted_at,soft_delete,nullzero" json:"deleted_at" yaml:"deleted_at"` }
func SettingsCreate ¶
func SettingsCreate(cReg *components.Registry, ctx context.Context, in *settingspb.CreateRequest) (*Setting, error)
func SettingsGet ¶
func SettingsList ¶
func SettingsUpdate ¶
func SettingsUpdate(cReg *components.Registry, ctx context.Context, id, ownerID, service, name string, content json.RawMessage) (*Setting, error)
func SettingsUpsert ¶
func SettingsUpsert(cReg *components.Registry, ctx context.Context, in *settingspb.UpsertRequest) (*Setting, error)
func (*Setting) UserHasReadPermission ¶
Click to show internal directories.
Click to hide internal directories.