edp

package
v0.0.0-...-4b7ff4e Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: Apache-2.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaasConsumerEnvironmentKey = "maasConsumerEnvironment"
	MaasConsumerRegionKey      = "maasConsumerRegion"
	MaasConsumerSubAccountKey  = "maasConsumerSubAccount"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(config Config, log logrus.FieldLogger) *Client

func (*Client) CreateDataTenant

func (c *Client) CreateDataTenant(data DataTenantPayload) error

func (*Client) CreateMetadataTenant

func (c *Client) CreateMetadataTenant(name, env string, data MetadataTenantPayload) error

func (*Client) DeleteDataTenant

func (c *Client) DeleteDataTenant(name, env string) error

func (*Client) DeleteMetadataTenant

func (c *Client) DeleteMetadataTenant(name, env, key string) error

func (*Client) GetMetadataTenant

func (c *Client) GetMetadataTenant(name, env string) (_ []MetadataItem, err error)

type Config

type Config struct {
	AuthURL     string
	AdminURL    string
	Namespace   string
	Secret      string
	Environment string `envconfig:"default=prod"`
	Required    bool   `envconfig:"default=false"`
	Disabled    bool
}

type DataTenantItem

type DataTenantItem struct {
	Namespace   NamespaceItem `json:"namespace"`
	Name        string        `json:"name"`
	Environment string        `json:"environment"`
}

type DataTenantPayload

type DataTenantPayload struct {
	Name        string `json:"name"`
	Environment string `json:"environment"`
	Secret      string `json:"secret"`
}

type MetadataItem

type MetadataItem struct {
	DataTenant DataTenantItem `json:"dataTenant"`
	Key        string         `json:"key"`
	Value      string         `json:"value"`
}

type MetadataTenantPayload

type MetadataTenantPayload struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type NamespaceItem

type NamespaceItem struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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