Documentation ¶
Index ¶
- func UseApp(target string) func(db *gorm.DB) *gorm.DB
- func UseEp(target string) func(db *gorm.DB) *gorm.DB
- func UseWsId(wsId, target string) func(db *gorm.DB) *gorm.DB
- type Application
- type Database
- type Endpoint
- type EndpointRule
- type SnaptshotRow
- type SqlApplication
- func (sql *SqlApplication) Count(ctx context.Context, wsId string, query *entities.PagingQuery) (int64, error)
- func (sql *SqlApplication) CreateBatch(ctx context.Context, docs []entities.Application) ([]string, error)
- func (sql *SqlApplication) Get(ctx context.Context, wsId, id string) (*entities.Application, error)
- type SqlEndpoint
- func (sql *SqlEndpoint) Count(ctx context.Context, wsId string, query *entities.PagingQuery) (int64, error)
- func (sql *SqlEndpoint) CreateBatch(ctx context.Context, docs []entities.Endpoint) ([]string, error)
- func (sql *SqlEndpoint) Get(ctx context.Context, wsId, id string) (*entities.Endpoint, error)
- type SqlEndpointRule
- type SqlWorkspace
- func (sql *SqlWorkspace) Create(ctx context.Context, doc *entities.Workspace) (*entities.Workspace, error)
- func (sql *SqlWorkspace) Get(ctx context.Context, id string) (*entities.Workspace, error)
- func (sql *SqlWorkspace) GetSnapshotRows(ct context.Context, id string) ([]SnaptshotRow, error)
- func (sql *SqlWorkspace) ListByIds(ctx context.Context, ids []string) ([]entities.Workspace, error)
- func (sql *SqlWorkspace) ListOwned(ctx context.Context, owner string) ([]entities.Workspace, error)
- func (sql *SqlWorkspace) Update(ctx context.Context, doc *entities.Workspace) (*entities.Workspace, error)
- type SqlWorkspaceCredentials
- func (sql *SqlWorkspaceCredentials) Count(ctx context.Context, wsId string, query *entities.PagingQuery) (int64, error)
- func (sql *SqlWorkspaceCredentials) Create(ctx context.Context, doc *entities.WorkspaceCredentials) (*entities.WorkspaceCredentials, error)
- func (sql *SqlWorkspaceCredentials) Get(ctx context.Context, wsId, id string) (*entities.WorkspaceCredentials, error)
- func (sql *SqlWorkspaceCredentials) List(ctx context.Context, wsId string, query *entities.PagingQuery) ([]entities.WorkspaceCredentials, error)
- func (sql *SqlWorkspaceCredentials) Update(ctx context.Context, doc *entities.WorkspaceCredentials) (*entities.WorkspaceCredentials, error)
- type Workspace
- type WorkspaceCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Database ¶
type Database interface { Transaction(ctx context.Context, handler func(txctx context.Context) (interface{}, error)) (res interface{}, err error) Workspace() Workspace WorkspaceCredentials() WorkspaceCredentials Application() Application Endpoint() Endpoint EndpointRule() EndpointRule }
type EndpointRule ¶
type SnaptshotRow ¶
type SnaptshotRow struct { WsId string `json:"ws_id"` WsName string `json:"ws_name"` AppId string `json:"app_id"` AppName string `json:"app_name"` EpId string `json:"ep_id"` EpName string `json:"ep_name"` EpMethod string `json:"ep_method"` EpUri string `json:"ep_uri"` EprId string `json:"epr_id"` EprName string `json:"epr_name"` EprPriority int32 `json:"epr_priority"` EprExclusionary bool `json:"epr_exclusionary"` EprConditionSource string `json:"epr_condition_source"` EprConditionExpression string `json:"epr_condition_expression"` }
type SqlApplication ¶
type SqlApplication struct {
// contains filtered or unexported fields
}
func (*SqlApplication) Count ¶
func (sql *SqlApplication) Count(ctx context.Context, wsId string, query *entities.PagingQuery) (int64, error)
func (*SqlApplication) CreateBatch ¶
func (sql *SqlApplication) CreateBatch(ctx context.Context, docs []entities.Application) ([]string, error)
func (*SqlApplication) Get ¶
func (sql *SqlApplication) Get(ctx context.Context, wsId, id string) (*entities.Application, error)
type SqlEndpoint ¶
type SqlEndpoint struct {
// contains filtered or unexported fields
}
func (*SqlEndpoint) Count ¶
func (sql *SqlEndpoint) Count(ctx context.Context, wsId string, query *entities.PagingQuery) (int64, error)
func (*SqlEndpoint) CreateBatch ¶
type SqlEndpointRule ¶
type SqlEndpointRule struct {
// contains filtered or unexported fields
}
func (*SqlEndpointRule) Count ¶
func (sql *SqlEndpointRule) Count(ctx context.Context, wsId string, query *entities.PagingQuery) (int64, error)
func (*SqlEndpointRule) CreateBatch ¶
func (sql *SqlEndpointRule) CreateBatch(ctx context.Context, docs []entities.EndpointRule) ([]string, error)
type SqlWorkspace ¶
type SqlWorkspace struct {
// contains filtered or unexported fields
}
func (*SqlWorkspace) GetSnapshotRows ¶
func (sql *SqlWorkspace) GetSnapshotRows(ct context.Context, id string) ([]SnaptshotRow, error)
type SqlWorkspaceCredentials ¶
type SqlWorkspaceCredentials struct {
// contains filtered or unexported fields
}
func (*SqlWorkspaceCredentials) Count ¶
func (sql *SqlWorkspaceCredentials) Count(ctx context.Context, wsId string, query *entities.PagingQuery) (int64, error)
func (*SqlWorkspaceCredentials) Create ¶
func (sql *SqlWorkspaceCredentials) Create(ctx context.Context, doc *entities.WorkspaceCredentials) (*entities.WorkspaceCredentials, error)
func (*SqlWorkspaceCredentials) Get ¶
func (sql *SqlWorkspaceCredentials) Get(ctx context.Context, wsId, id string) (*entities.WorkspaceCredentials, error)
func (*SqlWorkspaceCredentials) List ¶
func (sql *SqlWorkspaceCredentials) List(ctx context.Context, wsId string, query *entities.PagingQuery) ([]entities.WorkspaceCredentials, error)
func (*SqlWorkspaceCredentials) Update ¶
func (sql *SqlWorkspaceCredentials) Update(ctx context.Context, doc *entities.WorkspaceCredentials) (*entities.WorkspaceCredentials, error)
type Workspace ¶
type Workspace interface { Create(ctx context.Context, doc *entities.Workspace) (*entities.Workspace, error) Update(ctx context.Context, doc *entities.Workspace) (*entities.Workspace, error) ListByIds(ctx context.Context, ids []string) ([]entities.Workspace, error) Get(ctx context.Context, id string) (*entities.Workspace, error) ListOwned(ctx context.Context, owner string) ([]entities.Workspace, error) GetSnapshotRows(ct context.Context, id string) ([]SnaptshotRow, error) }
type WorkspaceCredentials ¶
type WorkspaceCredentials interface { Create(ctx context.Context, doc *entities.WorkspaceCredentials) (*entities.WorkspaceCredentials, error) Update(ctx context.Context, doc *entities.WorkspaceCredentials) (*entities.WorkspaceCredentials, error) List(ctx context.Context, wsId string, query *entities.PagingQuery) ([]entities.WorkspaceCredentials, error) Count(ctx context.Context, wsId string, query *entities.PagingQuery) (int64, error) Get(ctx context.Context, wsId, id string) (*entities.WorkspaceCredentials, error) }
Click to show internal directories.
Click to hide internal directories.