luigi

package
v0.0.0-...-e0434a4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicServiceData

type BasicServiceData struct {
	LoggingID         string `json:"logging_id,omitempty"`
	SourceID          string `json:"source_id"`
	Name              string `json:"name"`
	Organization      string `json:"organization"`
	Owner             string `json:"owner"`
	Admins            string `json:"admins,omitempty"`
	CapacityGigabytes int    `json:"capacity_gigabytes,omitempty"`
	CapacityComment   string `json:"capacity_comment,omitempty"`
}

type Client

type Client interface {
	CreateService(ctx context.Context, data *FullServiceData) (*FullServiceData, error)
	ListServices(ctx context.Context, search string) ([]BasicServiceData, error)
	DeleteService(ctx context.Context, loggingID string) error
}

type ClientImpl

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

func NewLuigiClient

func NewLuigiClient(logger *zap.Logger, httpClient *http.Client, asap pkiutil.ASAP, baseURL *url.URL) *ClientImpl

func (*ClientImpl) CreateService

func (c *ClientImpl) CreateService(ctx context.Context, data *FullServiceData) (*FullServiceData, error)

func (*ClientImpl) DeleteService

func (c *ClientImpl) DeleteService(ctx context.Context, loggingID string) error

func (*ClientImpl) ListServices

func (c *ClientImpl) ListServices(ctx context.Context, search string) ([]BasicServiceData, error)

type Creator

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

func NewCreator

func NewCreator(logger *zap.Logger, client Client) *Creator

func (*Creator) DeleteService

func (c *Creator) DeleteService(ctx context.Context, loggingID string) error

func (*Creator) FindOrCreateService

func (c *Creator) FindOrCreateService(ctx context.Context, meta *ServiceMetadata) (*BasicServiceData, error)

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

type FullServiceData

type FullServiceData struct {
	BasicServiceData

	Acls []ServiceACL `json:"acls"`
}

type Response

type Response struct {
	Data       json.RawMessage `json:"data"`
	StatusCode int             `json:"status_code"`
	Errors     []ErrorResponse `json:"errors"`
}

type ServiceACL

type ServiceACL struct {
	Environments string `json:"environments"`
	StaffIDGroup string `json:"staffid_group"`
}

type ServiceMetadata

type ServiceMetadata struct {
	Name         string
	BusinessUnit string
	Owner        string
	Admins       string
}

Jump to

Keyboard shortcuts

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