endpoints

package
v0.0.0-...-193f563 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2018 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TooShort   = "Too Short"
	VeryWeak   = "Very Weak"
	Weak       = "Weak"
	Good       = "Good"
	Strong     = "Strong"
	VeryStrong = "Very Strong"
)

Variables

This section is empty.

Functions

func Reverse

func Reverse(s string) string

Reverse string

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 AddViewRequest

type AddViewRequest struct {
	view.View
}

AddViewRequest request for add view

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

type DBCreateResponse struct {
	Status string            `json:"status"`
	Data   sqlmapper.RowData `json:"data"`
}

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

type DBQueryRequest struct {
	sqlmapper.Query
}

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

type DBUpdateResponse struct {
	Status string            `json:"status"`
	Data   sqlmapper.RowData `json:"data"`
}

DBUpdateResponse response for db Update data

type DeleteViewRequest

type DeleteViewRequest struct {
	DatabaseName string `json:"-"`
	SQLID        int    `json:"-"`
}

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

func MakeServerEndpoints(s service.Service) Endpoints

MakeServerEndpoints returns an Endpoints struct

type ExecuteViewRequest

type ExecuteViewRequest struct {
	DatabaseName string `json:"-"`
	SQLID        int    `json:"-"`
}

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

type ListViewResponse struct {
	Status string       `json:"status"`
	Views  []*view.View `json:"views"`
}

ListViewResponse response for list view

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

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

type RevertVersionResponse struct {
	Version config.Version `json:"version"`
}

RevertVersionResponse response for revert version

type RevertVersionResquest

type RevertVersionResquest struct {
	VersionID int `json:"version_id"`
}

RevertVersionResquest request for revert version

type SendEmailRequest

type SendEmailRequest struct {
	Username string `json:"username"`
	Email    string `json:"email"`
}

SendMailRequest store SendMail structer

type SendEmailResponse

type SendEmailResponse struct {
	Status string `json:"status"`
}

SendMailResponse store SendMail respone

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL