Documentation ¶
Index ¶
- Constants
- Variables
- func GetOffsetLinksForPGParams(r *http.Request, p pgdb.OffsetPageParams) *resources.Links
- type DeleteUserPayload
- type Module
- type ModuleQ
- type ModuleRoles
- type ModuleRolesResponse
- type Modules
- type ModulesRoles
- type ModulesRolesResponse
- type OrderType
- type PermissionsPayload
- type Request
- type RequestParams
- type RequestQ
- type RequestStatus
- type RequestTransaction
- type RequestTransactions
- type ResponseParams
- type Roles
- type TransactionAction
Constants ¶
View Source
const ( ModuleName = "orchestrator" RemoveModuleAction = "remove_module" DeleteUserAction = "delete_user" )
View Source
const ( OrderAscending = "asc" OrderDescending = "desc" )
Variables ¶
View Source
var ModuleIcon = map[string]string{
"gitlab": "https://gist.githack.com/mhrynenko/422743c0c88341f79542a4e381d239f5/raw/13b466475d9096da01f3958f956457b6a4a30498/GitLab_logo.svg",
"github": "https://gist.githack.com/mhrynenko/422743c0c88341f79542a4e381d239f5/raw/13b466475d9096da01f3958f956457b6a4a30498/GitHub_logo.svg",
"telegram": "https://gist.githack.com/mhrynenko/bc7966e91e28ac17dbe809503855e60a/raw/fdbaf990e1f1a1fdc84712af801413b34a709959/Telegram_logo.svg",
"docker": "https://gist.githack.com/mhrynenko/422743c0c88341f79542a4e381d239f5/raw/13b466475d9096da01f3958f956457b6a4a30498/DockerHub_logo.svg",
"click_up": "https://gist.githack.com/mhrynenko/422743c0c88341f79542a4e381d239f5/raw/13b466475d9096da01f3958f956457b6a4a30498/ClickUp_logo.svg",
"slack": "https://gist.githack.com/mhrynenko/422743c0c88341f79542a4e381d239f5/raw/13b466475d9096da01f3958f956457b6a4a30498/Slack_logo.svg",
"mail": "https://gist.githack.com/mhrynenko/422743c0c88341f79542a4e381d239f5/raw/17bcfd78386a8a438b3abc0739d31c306b0ba33a/DL_logo.svg",
}
Functions ¶
Types ¶
type DeleteUserPayload ¶
type Module ¶
type Module struct { Topic string `json:"topic" structs:"topic" db:"topic"` Link string `json:"link" structs:"link" db:"link"` Name string `json:"name" structs:"name" db:"name"` Title string `json:"title" structs:"title" db:"title"` Prefix string `json:"prefix" structs:"prefix" db:"prefix"` IsModule bool `json:"is_module" structs:"is_module" db:"is_module"` }
type ModuleRoles ¶
type ModuleRolesResponse ¶
type ModuleRolesResponse struct {
Data ModuleRoles `json:"data"`
}
type ModulesRoles ¶
type ModulesRolesResponse ¶
type ModulesRolesResponse struct {
Data ModulesRoles `json:"data"`
}
type PermissionsPayload ¶
type Request ¶
type Request struct { ID string `json:"id" db:"id" structs:"id"` FromUserID int64 `json:"from_user_id" db:"from_user_id" structs:"from_user_id,omitempty"` ToUserID int64 `json:"to_user_id" db:"to_user_id" structs:"to_user_id,omitempty"` Payload json.RawMessage `json:"payload" db:"payload" structs:"payload"` Status RequestStatus `json:"status" db:"status" structs:"status,omitempty"` Error *string `json:"error,omitempty" db:"error,omitempty" structs:"error,omitempty"` Description *string `json:"description,omitempty" db:"description,omitempty" structs:"description,omitempty"` Group *[]string `json:"group,omitempty" db:"group,omitempty" structs:"group,omitempty"` CreatedAt string `json:"created_at" db:"created_at" structs:"created_at,omitempty"` Module *Module `json:"module,omitempty" structs:"module,omitempty"` ModuleName string `json:"module_name" db:"module_name" structs:"module_name,omitempty"` }
type RequestParams ¶
type RequestQ ¶
type RequestQ interface { New() RequestQ FilterByIDs(ids ...string) RequestQ FilterByStatuses(statuses ...RequestStatus) RequestQ FilterByFromIds(ids ...int64) RequestQ FilterByToIds(ids ...int64) RequestQ FilterNotByActions(actions ...string) RequestQ JoinsModule() RequestQ Get() (*Request, error) Select() ([]Request, error) Insert(request Request) error Update(request Request) error SetStatus(status RequestStatus) error SetStatusError(status RequestStatus, errorMsg string) error Count() RequestQ GetTotalCount() (int64, error) Page(pageParams pgdb.OffsetPageParams) RequestQ }
type RequestStatus ¶
type RequestStatus string
const ( CREATED RequestStatus = "pending" PENDING RequestStatus = "in progress" FINISHED RequestStatus = "success" INVITED RequestStatus = "invited" FAILED RequestStatus = "failed" )
type RequestTransaction ¶
type RequestTransaction struct { ID string `json:"id" db:"id" structs:"id"` Action TransactionAction `json:"action" db:"action" structs:"action"` Requests json.RawMessage `json:"requests" db:"requests" structs:"requests"` }
type RequestTransactions ¶
type RequestTransactions interface { New() RequestTransactions Get() (*RequestTransaction, error) Select() ([]RequestTransaction, error) Insert(request RequestTransaction) error Update(request RequestTransaction) error Delete() error FilterByIDs(ids ...string) RequestTransactions FilterByRequestID(id string) RequestTransactions }
type ResponseParams ¶
type ResponseParams struct { Body io.ReadCloser Header http.Header StatusCode int }
type TransactionAction ¶
type TransactionAction string
const ( Single TransactionAction = "single" DeleteUser TransactionAction = "delete_user" )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.