version1

package
v1.1.0-1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterTypeRoot    = "root"
	ClusterTypeTenants = "tenants"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterV1

type ClusterV1 struct {
	Id string `json:"id"`

	Name   string `json:"name"`
	Type   string `json:"type"`
	Active bool   `json:"active"`

	MasterNodes []string `json:"master_nodes"`
	SlaveNodes  []string `json:"slave_nodes"`

	ApiHost      string            `json:"api_host"`
	ServicePorts map[string]uint16 `json:"service_port"`

	Maintenance bool      `json:"maintenance"`
	Version     string    `json:"version"`
	UpdateTime  time.Time `json:"update_time"`

	MaxTenantCount  int      `json:"max_tenant_count"`
	TenantsCount    int      `json:"tenants_count"`
	Open            bool     `json:"open"`
	ActiveTenants   []string `json:"active_tenants"`
	InactiveTenants []string `json:"inactive_tenants"`
}

type ClustersCommandableHttpClientV1

type ClustersCommandableHttpClientV1 struct {
	*clients.CommandableHttpClient
}

func NewClustersCommandableHttpClientV1

func NewClustersCommandableHttpClientV1() *ClustersCommandableHttpClientV1

func (*ClustersCommandableHttpClientV1) AddTenant

func (c *ClustersCommandableHttpClientV1) AddTenant(ctx context.Context, correlationId string, tenantId string) (*ClusterV1, error)

func (*ClustersCommandableHttpClientV1) CreateCluster

func (c *ClustersCommandableHttpClientV1) CreateCluster(ctx context.Context, correlationId string, cluster *ClusterV1) (*ClusterV1, error)

func (*ClustersCommandableHttpClientV1) DeleteClusterById

func (c *ClustersCommandableHttpClientV1) DeleteClusterById(ctx context.Context, correlationId string, clusterId string) (*ClusterV1, error)

func (*ClustersCommandableHttpClientV1) GetClusterById

func (c *ClustersCommandableHttpClientV1) GetClusterById(ctx context.Context, correlationId string, clusterId string) (*ClusterV1, error)

func (*ClustersCommandableHttpClientV1) GetClusterByTenant

func (c *ClustersCommandableHttpClientV1) GetClusterByTenant(ctx context.Context, correlationId string, tenantId string) (*ClusterV1, error)

func (*ClustersCommandableHttpClientV1) GetClusters

func (c *ClustersCommandableHttpClientV1) GetClusters(ctx context.Context, correlationId string, filter *data.FilterParams, paging *data.PagingParams) (data.DataPage[*ClusterV1], error)

func (*ClustersCommandableHttpClientV1) RemoveTenant

func (c *ClustersCommandableHttpClientV1) RemoveTenant(ctx context.Context, correlationId string, tenantId string) (*ClusterV1, error)

func (*ClustersCommandableHttpClientV1) UpdateCluster

func (c *ClustersCommandableHttpClientV1) UpdateCluster(ctx context.Context, correlationId string, cluster *ClusterV1) (*ClusterV1, error)

type ClustersMockClientV1

type ClustersMockClientV1 struct {
	// contains filtered or unexported fields
}

func NewClustersMockClientV1

func NewClustersMockClientV1() *ClustersMockClientV1

func (*ClustersMockClientV1) AddTenant

func (c *ClustersMockClientV1) AddTenant(ctx context.Context, correlationId string, tenantId string) (*ClusterV1, error)

func (*ClustersMockClientV1) CreateCluster

func (c *ClustersMockClientV1) CreateCluster(ctx context.Context, correlationId string, cluster *ClusterV1) (*ClusterV1, error)

func (*ClustersMockClientV1) DeleteClusterById

func (c *ClustersMockClientV1) DeleteClusterById(ctx context.Context, correlationId string, clusterId string) (*ClusterV1, error)

func (*ClustersMockClientV1) GetClusterById

func (c *ClustersMockClientV1) GetClusterById(ctx context.Context, correlationId string, clusterId string) (result *ClusterV1, err error)

func (*ClustersMockClientV1) GetClusterByTenant

func (c *ClustersMockClientV1) GetClusterByTenant(ctx context.Context, correlationId string, tenantId string) (result *ClusterV1, err error)

func (*ClustersMockClientV1) GetClusters

func (c *ClustersMockClientV1) GetClusters(ctx context.Context, correlationId string, filter *data.FilterParams, paging *data.PagingParams) (data.DataPage[*ClusterV1], error)

func (*ClustersMockClientV1) RemoveTenant

func (c *ClustersMockClientV1) RemoveTenant(ctx context.Context, correlationId string, tenantId string) (*ClusterV1, error)

func (*ClustersMockClientV1) UpdateCluster

func (c *ClustersMockClientV1) UpdateCluster(ctx context.Context, correlationId string, cluster *ClusterV1) (*ClusterV1, error)

type ClustersNullClientV1

type ClustersNullClientV1 struct {
}

func NewClustersNullClientV1

func NewClustersNullClientV1() *ClustersNullClientV1

func (*ClustersNullClientV1) AddTenant

func (c *ClustersNullClientV1) AddTenant(ctx context.Context, correlationId string, tenantId string) (*ClusterV1, error)

func (*ClustersNullClientV1) CreateCluster

func (c *ClustersNullClientV1) CreateCluster(ctx context.Context, correlationId string, cluster *ClusterV1) (*ClusterV1, error)

func (*ClustersNullClientV1) DeleteClusterById

func (c *ClustersNullClientV1) DeleteClusterById(ctx context.Context, correlationId string, clusterId string) (*ClusterV1, error)

func (*ClustersNullClientV1) GetClusterById

func (c *ClustersNullClientV1) GetClusterById(ctx context.Context, correlationId string, clusterId string) (*ClusterV1, error)

func (*ClustersNullClientV1) GetClusterByTenant

func (c *ClustersNullClientV1) GetClusterByTenant(ctx context.Context, correlationId string, tenantId string) (*ClusterV1, error)

func (*ClustersNullClientV1) GetClusters

func (c *ClustersNullClientV1) GetClusters(ctx context.Context, correlationId string, filter *data.FilterParams, paging *data.PagingParams) (data.DataPage[*ClusterV1], error)

func (*ClustersNullClientV1) RemoveTenant

func (c *ClustersNullClientV1) RemoveTenant(ctx context.Context, correlationId string, tenantId string) (*ClusterV1, error)

func (*ClustersNullClientV1) UpdateCluster

func (c *ClustersNullClientV1) UpdateCluster(ctx context.Context, correlationId string, cluster *ClusterV1) (*ClusterV1, error)

type IClustersClientV1

type IClustersClientV1 interface {
	GetClusters(ctx context.Context, correlationId string, filter *data.FilterParams, paging *data.PagingParams) (data.DataPage[*ClusterV1], error)

	GetClusterById(ctx context.Context, correlationId string, clusterId string) (*ClusterV1, error)

	GetClusterByTenant(ctx context.Context, correlationId string, tenantId string) (*ClusterV1, error)

	CreateCluster(ctx context.Context, correlationId string, cluster *ClusterV1) (*ClusterV1, error)

	UpdateCluster(ctx context.Context, correlationId string, cluster *ClusterV1) (*ClusterV1, error)

	DeleteClusterById(ctx context.Context, correlationId string, clusterId string) (*ClusterV1, error)

	AddTenant(ctx context.Context, correlationId string, tenantId string) (*ClusterV1, error)

	RemoveTenant(ctx context.Context, correlationId string, tenantId string) (*ClusterV1, error)
}

Jump to

Keyboard shortcuts

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