http

package
v1.381.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(handler *Handler)

Register for HTTP.

Types

type Config

type Config struct {
	Application string `json:"application,omitempty"`
	Version     string `json:"version,omitempty"`
	Environment string `json:"environment,omitempty"`
	Continent   string `json:"continent,omitempty"`
	Country     string `json:"country,omitempty"`
	Command     string `json:"command,omitempty"`
	Kind        string `json:"kind,omitempty"`
	Data        []byte `json:"data,omitempty"`
}

Config for a specific application.

type GetConfigRequest

type GetConfigRequest struct {
	Application string `json:"application,omitempty"`
	Version     string `json:"version,omitempty"`
	Environment string `json:"environment,omitempty"`
	Continent   string `json:"continent,omitempty"`
	Country     string `json:"country,omitempty"`
	Command     string `json:"command,omitempty"`
	Kind        string `json:"kind,omitempty"`
}

GetConfigRequest for a specific application.

type GetConfigResponse

type GetConfigResponse struct {
	Meta   map[string]string `json:"meta,omitempty"`
	Config *Config           `json:"config,omitempty"`
}

GetConfigResponse for a specific application.

type GetSecretsRequest

type GetSecretsRequest struct {
	Secrets map[string]string `json:"secrets,omitempty"`
}

GetSecretsRequest a map of name and secret.

type GetSecretsResponse

type GetSecretsResponse struct {
	Meta    map[string]string `json:"meta,omitempty"`
	Secrets map[string][]byte `json:"secrets,omitempty"`
}

GetSecretsResponse a map of meta and secrets.

type Handler added in v1.371.0

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

Handler for HTTP.

func NewHandler added in v1.371.0

func NewHandler(service *config.Configuration) *Handler

NewServer for HTTP.

func (*Handler) GetConfig added in v1.371.0

func (h *Handler) GetConfig(ctx context.Context, req *GetConfigRequest) (*GetConfigResponse, error)

GetConfig for HTTP.

func (*Handler) GetSecrets added in v1.371.0

func (h *Handler) GetSecrets(ctx context.Context, req *GetSecretsRequest) (*GetSecretsResponse, error)

GetSecrets for HTTP.

Jump to

Keyboard shortcuts

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