backend

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: Apache-2.0 Imports: 22 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MICRO_ENVIRONMENT = "MICRO_ENVIRONMENT"
	K8S               = "k8s"

	PROJECTS_URI         = "/v3/projects"
	PROJECTS_QUERY_CONDN = "?domain_id=default"
)

Variables

This section is empty.

Functions

func RegisterRouter

func RegisterRouter(ws *restful.WebService)

func ValidateTenant added in v1.4.2

func ValidateTenant(authToken, tenantId string) bool

/function to validate tenant:

Types

type APIService

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

func NewAPIService

func NewAPIService(c client.Client) *APIService

func (*APIService) CheckInvalidBackends added in v1.3.2

func (s *APIService) CheckInvalidBackends(ctx context.Context, backends []string) ([]string, error)

func (*APIService) CreateBackend

func (s *APIService) CreateBackend(request *restful.Request, response *restful.Response)

func (*APIService) CreateTier added in v1.3.1

func (s *APIService) CreateTier(request *restful.Request, response *restful.Response)

tiering functions

func (*APIService) DeleteBackend

func (s *APIService) DeleteBackend(request *restful.Request, response *restful.Response)

func (*APIService) DeleteTier added in v1.3.1

func (s *APIService) DeleteTier(request *restful.Request, response *restful.Response)

given tierId need to delete the tier

func (*APIService) EncryptData added in v1.1.0

func (s *APIService) EncryptData(request *restful.Request, response *restful.Response)

func (*APIService) FilterBackendByTier added in v0.5.2

func (s *APIService) FilterBackendByTier(ctx context.Context, request *restful.Request, response *restful.Response,
	tier int32)

func (*APIService) GetBackend

func (s *APIService) GetBackend(request *restful.Request, response *restful.Response)

func (*APIService) GetTier added in v1.3.1

func (s *APIService) GetTier(request *restful.Request, response *restful.Response)

GetTier if tierId is given then details of tier to be given

func (*APIService) ListBackend

func (s *APIService) ListBackend(request *restful.Request, response *restful.Response)

func (*APIService) ListTiers added in v1.3.1

func (s *APIService) ListTiers(request *restful.Request, response *restful.Response)

List of tiers is displayed

func (*APIService) ListType

func (s *APIService) ListType(request *restful.Request, response *restful.Response)

func (*APIService) UpdateBackend

func (s *APIService) UpdateBackend(request *restful.Request, response *restful.Response)

func (*APIService) UpdateTier added in v1.3.1

func (s *APIService) UpdateTier(request *restful.Request, response *restful.Response)

here backendId can be updated

type DeCrypter added in v1.1.0

type DeCrypter struct {
	CipherText string `json:"ciphertext,omitempty"`
}

type EnCrypter added in v1.1.0

type EnCrypter struct {
	Algo      string `json:"algo,omitempty"`
	Access    string `json:"access,omitempty"`
	PlainText string `json:"plaintext,omitempty"`
}

type ProjectsResponse added in v1.4.2

type ProjectsResponse struct {
	Links struct {
		Self     string      `json:"self"`
		Previous interface{} `json:"previous"`
		Next     interface{} `json:"next"`
	} `json:"links"`
	Projects []struct {
		IsDomain    bool   `json:"is_domain"`
		Description string `json:"description"`
		Links       struct {
			Self string `json:"self"`
		} `json:"links"`
		Tags     []interface{} `json:"tags"`
		Enabled  bool          `json:"enabled"`
		ID       string        `json:"id"`
		ParentID string        `json:"parent_id"`
		DomainID string        `json:"domain_id"`
		Name     string        `json:"name"`
	} `json:"projects"`
}

response of projects

Jump to

Keyboard shortcuts

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