Documentation ¶
Index ¶
- Constants
- func Reverse(s string) string
- type AddHookRequest
- type AddHookResponse
- type AddViewRequest
- type AddViewResponse
- type AvailableModelsResponse
- type ChangePasswordRequest
- type ChangePasswordResponse
- type ConfirmCodeRequest
- type ConfirmCodeResponse
- type DBCreateRequest
- type DBCreateResponse
- type DBDeleteRequest
- type DBDeleteResponse
- type DBQueryRequest
- type DBQueryResponse
- type DBUpdateRequest
- type DBUpdateResponse
- type DeleteViewRequest
- type DeleteViewResponse
- type Endpoints
- type ExecuteViewRequest
- type ExecuteViewResponse
- type FindAccountRequest
- type FindAccountResponse
- type ListViewRequest
- type ListViewResponse
- type LoginRequest
- type LoginResponse
- type ResetPasswordRequest
- type ResetPasswordResponse
- type RevertVersionResponse
- type RevertVersionResquest
- type SendEmailRequest
- type SendEmailResponse
Constants ¶
const ( TooShort = "Too Short" VeryWeak = "Very Weak" Weak = "Weak" Good = "Good" Strong = "Strong" VeryStrong = "Very Strong" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddHookRequest ¶
type AddHookRequest struct { TableName string `json:"table_name"` HookContent string `json:"hook_content"` HookType string `json:"hook_type"` }
AddHookRequest request for db create data
type AddHookResponse ¶
type AddHookResponse struct {
Status string `json:"status"`
}
AddHookResponse response for db create data
type AddViewResponse ¶
type AddViewResponse struct { Status string `json:"status"` QueryPlan interface{} `json:"query_plan"` }
AddViewResponse response for add view
type AvailableModelsResponse ¶
type AvailableModelsResponse struct { Status string `json:"status"` AvailableMethods []string `json:"available_methods"` AvailableHookTypes []string `json:"available_hook_types"` Models []database.Database `json:"models"` }
AvailableModelsResponse response for available model endpoints
type ChangePasswordRequest ¶
type ChangePasswordRequest struct { OldPassword string `json:"old_password"` NewPassword string `json:"new_password"` NewPasswordConfirmation string `json:"new_password_confirmation"` }
ChangePasswordRequest store change password structer
type ChangePasswordResponse ¶
type ChangePasswordResponse struct {
Complexity string `json:"complexity"`
}
ChangePasswordResponse store change password respone
type ConfirmCodeRequest ¶
type ConfirmCodeRequest struct { Username string `json:"username"` ConfirmCode string `json:"confirm_code"` }
ConfirmCodeRequest store Confirm code structer
type ConfirmCodeResponse ¶
type ConfirmCodeResponse struct {
Status string `json:"status"`
}
ConfirmCodeResponse store Confirm code respone
type DBCreateRequest ¶
type DBCreateRequest struct { TableName string `json:"-"` DatabaseName string `json:"-"` Fields []interface{} `json:"fields"` Data []interface{} `json:"data"` }
DBCreateRequest request for db create data
type DBCreateResponse ¶
DBCreateResponse response for db create data
type DBDeleteRequest ¶
type DBDeleteRequest struct { TableName string `json:"-"` DatabaseName string `json:"-"` Filter deleteFilter `json:"filter"` }
DBDeleteRequest request for db delete data by id
type DBDeleteResponse ¶
type DBDeleteResponse struct {
Status string `json:"status"`
}
DBDeleteResponse response for db delete data by id
type DBQueryRequest ¶
DBQueryRequest request for db query
type DBQueryResponse ¶
type DBQueryResponse struct { Status string `json:"status"` Columns []string `json:"columns,omitempty"` Rows []interface{} `json:"rows,omitempty"` Cols []database.Column `json:"cols,omitempty"` }
DBQueryResponse response for db query
type DBUpdateRequest ¶
type DBUpdateRequest struct { TableName string `json:"-"` DatabaseName string `json:"-"` Fields []interface{} `json:"fields"` Data []interface{} `json:"data"` }
DBUpdateRequest request for db Update data
type DBUpdateResponse ¶
DBUpdateResponse response for db Update data
type DeleteViewRequest ¶
DeleteViewRequest request for add view
type DeleteViewResponse ¶
type DeleteViewResponse struct {
Status string `json:"status"`
}
DeleteViewResponse response for add view
type Endpoints ¶
type Endpoints struct { AgentSync endpoint.Endpoint AvailableModels endpoint.Endpoint AddHook endpoint.Endpoint DBQuery endpoint.Endpoint DBCreate endpoint.Endpoint DBUpdate endpoint.Endpoint DBDelete endpoint.Endpoint ListVersion endpoint.Endpoint RevertVersion endpoint.Endpoint Login endpoint.Endpoint ChangePassword endpoint.Endpoint FindAccount endpoint.Endpoint SendEmail endpoint.Endpoint ConfirmCode endpoint.Endpoint ResetPassword endpoint.Endpoint ViewAdd endpoint.Endpoint ViewList endpoint.Endpoint ViewDelete endpoint.Endpoint ViewExecute endpoint.Endpoint GroupCreate endpoint.Endpoint GroupFind endpoint.Endpoint GroupFindAll endpoint.Endpoint GroupUpdate endpoint.Endpoint GroupDelete endpoint.Endpoint UserCreate endpoint.Endpoint UserFind endpoint.Endpoint UserFindAll endpoint.Endpoint UserUpdate endpoint.Endpoint UserDelete endpoint.Endpoint PermissionFindByGroup endpoint.Endpoint PermissionFindByUser endpoint.Endpoint PermissionUpdate endpoint.Endpoint }
Endpoints .
func MakeServerEndpoints ¶
MakeServerEndpoints returns an Endpoints struct
type ExecuteViewRequest ¶
ExecuteViewRequest request for add view
type ExecuteViewResponse ¶
type ExecuteViewResponse struct { Status string `json:"status"` Columns []string `json:"columns,omitempty"` Rows []interface{} `json:"rows,omitempty"` Cols []database.Column `json:"cols,omitempty"` }
ExecuteViewResponse response for add view
type FindAccountRequest ¶
type FindAccountRequest struct {
Username string `json:"username"`
}
FindAccountRequest store login structer
type FindAccountResponse ¶
type FindAccountResponse struct {
Email string `json:"email"`
}
FindAccountResponse store login respone
type ListViewRequest ¶
type ListViewRequest struct {
DatabaseName string `json:"-"`
}
ListViewRequest request for list view
type ListViewResponse ¶
ListViewResponse response for list view
type LoginRequest ¶
LoginRequest store login structer
type LoginResponse ¶
type LoginResponse struct {
Authentication string `json:"authentication"`
}
LoginResponse store login respone
type ResetPasswordRequest ¶
type ResetPasswordRequest struct { Username string `json:"username"` NewPassword string `json:"new_password"` NewPasswordConfirmation string `json:"new_password_confirmation"` }
ResetPasswordRequest store reset password structer
type ResetPasswordResponse ¶
type ResetPasswordResponse struct {
Complexity string `json:"complexity"`
}
ResetPasswordResponse store reset password respone
type RevertVersionResponse ¶
RevertVersionResponse response for revert version
type RevertVersionResquest ¶
type RevertVersionResquest struct {
VersionID int `json:"version_id"`
}
RevertVersionResquest request for revert version
type SendEmailRequest ¶
SendMailRequest store SendMail structer
type SendEmailResponse ¶
type SendEmailResponse struct {
Status string `json:"status"`
}
SendMailResponse store SendMail respone