Documentation
¶
Index ¶
- type Authorization
- type Details
- type GSIConfig
- type MIPConfig
- type Payload
- func (c *Payload) CreatedTime() time.Time
- func (c *Payload) ID() string
- func (c *Payload) Namespace() string
- func (c *Payload) RefIDs() []string
- func (c *Payload) URL() string
- func (c *Payload) Validate() *types.CommonError
- func (c *Payload) WithCreatedTime(t time.Time) mycontent.Data
- func (c *Payload) WithID(id string) mycontent.Data
- func (c *Payload) WithNamespace(id string) mycontent.Data
- func (c *Payload) WithURL(url string) mycontent.Data
- type UseCase
- type UserProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Details ¶
type Details struct {
ID string `json:"id"` // email
Profile UserProfile `json:"profile"`
GSI GSIConfig `json:"gsi"`
MIP MIPConfig `json:"mip"`
DefaultHomepage string `json:"default_homepage"`
Authorization map[string]Authorization `json:"authorization"` // organization/tenant id as key
}
type Payload ¶
type Payload struct {
Ns string `json:"namespace"`
Url string `json:"url"`
Id string `json:"id"` // email
Profile UserProfile `json:"profile"`
GSI GSIConfig `json:"gsi"`
MIP MIPConfig `json:"mip"`
DefaultHomepage string `json:"default_homepage"`
Authorization map[string]Authorization `json:"authorization"` // organization/tenant id as key
CreatedAt string `json:"created_at"`
}
func (*Payload) CreatedTime ¶
func (*Payload) Validate ¶
func (c *Payload) Validate() *types.CommonError
type UseCase ¶
type UseCase interface {
GetByOrgID(ctx context.Context, organizationID, nameContained string) ([]Details, error)
GetDetail(ctx context.Context, email string) (Details, error)
Insert(ctx context.Context, payload Payload) error
Update(ctx context.Context, email string, payload Payload) error
Delete(ctx context.Context, email string) error
}
type UserProfile ¶
type UserProfile struct {
ID string `json:"id"`
ImageURL string `json:"image_url"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
Role string `json:"role"`
Description string `json:"description"`
Avatar1x1URL string `json:"avatar_1x1_url"`
Background3x1URL string `json:"background_3x1_url"`
CreatedAt string `json:"created_at"`
}
Click to show internal directories.
Click to hide internal directories.