http

package
v1.163.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(params RegisterParams) error

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 Error

type Error struct {
	Message string `json:"message,omitempty"`
}

Error for HTTP.

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"`
	Error  *Error            `json:"error,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"`
	Error   *Error            `json:"error,omitempty"`
	Secrets map[string][]byte `json:"secrets,omitempty"`
}

GetSecretsResponse a map of meta and secrets.

type RegisterParams

type RegisterParams struct {
	fx.In

	Marshaller *marshaller.Map
	Mux        http.ServeMux
	Service    *service.Service
}

RegisterParams for HTTP.

type Server

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

Server for HTTP.

func (*Server) GetConfig

func (s *Server) GetConfig(ctx context.Context, req *GetConfigRequest) (*GetConfigResponse, error)

GetConfig for HTTP.

func (*Server) GetSecrets

func (s *Server) 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