Documentation ¶
Index ¶
- type AddUser
- type DeleteUser
- type Details
- type EstimatedTime
- type EstimatedTimeAttributes
- type EstimatedTimeListResponse
- type EstimatedTimeResponse
- type Flag
- type Flagger
- type Flags
- type GetUsers
- type Included
- func (c *Included) Add(includes ...Resource)
- func (c Included) MarshalJSON() ([]byte, error)
- func (c *Included) MustEstimatedTime(key Key) *EstimatedTime
- func (c *Included) MustInputs(key Key) *Inputs
- func (c *Included) MustLink(key Key) *Link
- func (c *Included) MustModule(key Key) *Module
- func (c *Included) MustRequest(key Key) *Request
- func (c *Included) MustSubmodules(key Key) *Submodules
- func (c *Included) MustUser(key Key) *User
- func (c *Included) MustUserInfo(key Key) *UserInfo
- func (c *Included) MustUserPermission(key Key) *UserPermission
- func (c *Included) UnmarshalJSON(data []byte) error
- type Inputs
- type InputsAttributes
- type InputsListResponse
- type InputsResponse
- type Key
- type Link
- type LinkAttributes
- type LinkListResponse
- type LinkResponse
- type Links
- type Module
- type ModuleAttributes
- type ModuleListResponse
- type ModuleResponse
- type Relation
- type RelationCollection
- type RemoveUser
- type Request
- type RequestAttributes
- type RequestListResponse
- type RequestRelationships
- type RequestResponse
- type Resource
- type ResourceType
- type Submodules
- type SubmodulesAttributes
- type SubmodulesListResponse
- type SubmodulesResponse
- type User
- type UserAttributes
- type UserInfo
- type UserInfoAttributes
- type UserInfoListResponse
- type UserInfoResponse
- type UserListResponse
- type UserPermission
- type UserPermissionAttributes
- type UserPermissionListResponse
- type UserPermissionResponse
- type UserResponse
- type VerifyUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddUser ¶
type AddUser struct { // action that must be handled in module, must be \"add_user\" Action string `json:"action"` // user email to add domain Email string `json:"email"` // first name of the user FirstName string `json:"first_name"` // last name of the user LastName string `json:"last_name"` // link where module has to add user Link string `json:"link"` // user's id from identity UserId string `json:"user_id"` }
type DeleteUser ¶
type Details ¶
type Details json.RawMessage
func (Details) MarshalJSON ¶
MarshalJSON - casts Details to []byte
func (*Details) UnmarshalJSON ¶
UnmarshalJSON - casts data to Details
type EstimatedTime ¶
type EstimatedTime struct { Key Attributes EstimatedTimeAttributes `json:"attributes"` }
type EstimatedTimeAttributes ¶
type EstimatedTimeAttributes struct {
EstimatedTime string `json:"estimated_time"`
}
type EstimatedTimeListResponse ¶
type EstimatedTimeListResponse struct { Data []EstimatedTime `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` }
type EstimatedTimeResponse ¶
type EstimatedTimeResponse struct { Data EstimatedTime `json:"data"` Included Included `json:"included"` }
type Included ¶
type Included struct {
// contains filtered or unexported fields
}
Included - an array of Resource objects that are related to the primary data and/or each other (“included resources”).
func (Included) MarshalJSON ¶
MarshalJSON - marshals include collection as array of json objects
func (*Included) MustEstimatedTime ¶
func (c *Included) MustEstimatedTime(key Key) *EstimatedTime
MustEstimatedTime - returns EstimatedTime from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustInputs ¶
MustInputs - returns Inputs from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustLink ¶
MustLink - returns Link from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustModule ¶
MustModule - returns Module from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustRequest ¶
MustRequest - returns Request from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustSubmodules ¶
func (c *Included) MustSubmodules(key Key) *Submodules
MustSubmodules - returns Submodules from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustUser ¶
MustUser - returns User from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustUserInfo ¶
MustUserInfo - returns UserInfo from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustUserPermission ¶
func (c *Included) MustUserPermission(key Key) *UserPermission
MustUserPermission - returns UserPermission from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) UnmarshalJSON ¶
UmarshalJSON - unmarshal array of json objects into include collection
type Inputs ¶
type Inputs struct { Key Attributes InputsAttributes `json:"attributes"` }
type InputsAttributes ¶
type InputsListResponse ¶
type InputsResponse ¶
type Key ¶
type Key struct { ID string `json:"id"` Type ResourceType `json:"type"` }
func NewKeyInt64 ¶
func NewKeyInt64(id int64, resourceType ResourceType) Key
func (Key) AsRelation ¶
type Link ¶
type Link struct { Key Attributes LinkAttributes `json:"attributes"` }
type LinkAttributes ¶
type LinkListResponse ¶
type LinkResponse ¶
type Module ¶
type Module struct { Key Attributes ModuleAttributes `json:"attributes"` }
type ModuleAttributes ¶
type ModuleAttributes struct { // indicates whether module (gitlab, telegram etc.) or service (unverified, role etc.) IsModule bool `json:"is_module"` // Module url Link string `json:"link"` // Module name Name string `json:"name"` // Module prefix to use in FE Prefix string `json:"prefix"` // Module name to use in FE Title string `json:"title"` // Module topic for sender and others Topic string `json:"topic"` }
type ModuleListResponse ¶
type ModuleResponse ¶
type RelationCollection ¶
func (RelationCollection) MarshalJSON ¶
func (r RelationCollection) MarshalJSON() ([]byte, error)
type RemoveUser ¶
type RemoveUser struct { // action that must be handled in module, must be \"remove_user\" Action string `json:"action"` // user email to remove domain Email string `json:"email"` }
action to remove user from domain in mail
type Request ¶
type Request struct { Key Attributes RequestAttributes `json:"attributes"` Relationships RequestRelationships `json:"relationships"` }
type RequestAttributes ¶
type RequestAttributes struct { // Module to grant permission Module string `json:"module"` // Already built payload to grant permission <br><br> -> \"add_user\" = action to add user in module<br> -> \"verify_user\" = action to verify user in module (connect user id from identity with module info)<br> -> \"get_users\" = action to get users with their permissions from module<br> -> \"delete_user\" = action to delete user from module<br> -> \"remove_user\" = action to remove user from submodule<br> Payload json.RawMessage `json:"payload"` }
type RequestListResponse ¶
type RequestRelationships ¶
type RequestRelationships struct {
User Relation `json:"user"`
}
type RequestResponse ¶
type ResourceType ¶
type ResourceType string
const ( ESTIMATED_TIME ResourceType = "estimated_time" INPUTS ResourceType = "inputs" LINKS ResourceType = "links" MODULES ResourceType = "modules" REQUESTS ResourceType = "requests" USER ResourceType = "user" USER_PERMISSION ResourceType = "user_permission" )
List of ResourceType
type Submodules ¶
type Submodules struct { Key Attributes SubmodulesAttributes `json:"attributes"` }
type SubmodulesAttributes ¶
type SubmodulesAttributes struct {
Links []string `json:"links"`
}
type SubmodulesListResponse ¶
type SubmodulesListResponse struct { Data []Submodules `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` }
type SubmodulesResponse ¶
type SubmodulesResponse struct { Data Submodules `json:"data"` Included Included `json:"included"` }
type User ¶
type User struct { Key Attributes UserAttributes `json:"attributes"` }
type UserAttributes ¶
type UserAttributes struct { // timestamp without timezone when user was created CreatedAt *time.Time `json:"created_at,omitempty"` // module name Module string `json:"module"` // submodule name Submodule *string `json:"submodule,omitempty"` // user id from identity module, if user is not verified - null UserId *int64 `json:"user_id,omitempty"` // email from mail Username *string `json:"username,omitempty"` }
type UserInfo ¶
type UserInfo struct { Key Attributes UserInfoAttributes `json:"attributes"` }
type UserInfoAttributes ¶
type UserInfoListResponse ¶
type UserInfoResponse ¶
type UserListResponse ¶
type UserPermission ¶
type UserPermission struct { Key Attributes UserPermissionAttributes `json:"attributes"` }
type UserPermissionAttributes ¶
type UserPermissionAttributes struct { // domain name Link string `json:"link"` // user id from module ModuleId string `json:"module_id"` // domain name Path string `json:"path"` // user id from identity UserId *int64 `json:"user_id,omitempty"` // email from domain Username string `json:"username"` }
type UserPermissionListResponse ¶
type UserPermissionListResponse struct { Data []UserPermission `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` }
type UserPermissionResponse ¶
type UserPermissionResponse struct { Data UserPermission `json:"data"` Included Included `json:"included"` }
type UserResponse ¶
type VerifyUser ¶
Source Files ¶
- db.go
- flag.go
- included.go
- model_add_user.go
- model_delete_user.go
- model_details.go
- model_estimated_time.go
- model_estimated_time_attributes.go
- model_get_users.go
- model_inputs.go
- model_inputs_attributes.go
- model_key.go
- model_link.go
- model_link_attributes.go
- model_links.go
- model_module.go
- model_module_attributes.go
- model_relation.go
- model_relation_collection.go
- model_remove_user.go
- model_request.go
- model_request_attributes.go
- model_request_relationships.go
- model_resource_type.go
- model_submodules.go
- model_submodules_attributes.go
- model_user.go
- model_user_attributes.go
- model_user_info.go
- model_user_info_attributes.go
- model_user_permission.go
- model_user_permission_attributes.go
- model_verify_user.go