client

package
v0.160.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module for fx.

Functions

func NewServiceClient

func NewServiceClient(params ServiceClientParams) (v1.ServiceClient, error)

NewServiceClient for konfig.

Types

type Client

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

Client for konfig.

func NewClient

func NewClient(client v1.ServiceClient, config *Config) *Client

NewClient for konfig.

func (*Client) Config

func (c *Client) Config(ctx context.Context) (string, error)

Config from request.

func (*Client) Secrets

func (c *Client) Secrets(ctx context.Context) (map[string][]byte, error)

Secrets from request.

type Config

type Config struct {
	*client.Config `yaml:",inline" json:",inline" toml:",inline"`
	Configuration  *Configuration `yaml:"config,omitempty" json:"config,omitempty" toml:"config,omitempty"`
	Secrets        *Secrets       `yaml:"secrets,omitempty" json:"secrets,omitempty" toml:"secrets,omitempty"`
}

Config for konfig.

type Configuration

type Configuration struct {
	Application string `yaml:"application,omitempty" json:"application,omitempty" toml:"application,omitempty"`
	Version     string `yaml:"version,omitempty" json:"version,omitempty" toml:"version,omitempty"`
	Environment string `yaml:"environment,omitempty" json:"environment,omitempty" toml:"environment,omitempty"`
	Continent   string `yaml:"continent,omitempty" json:"continent,omitempty" toml:"continent,omitempty"`
	Country     string `yaml:"country,omitempty" json:"country,omitempty" toml:"country,omitempty"`
	Command     string `yaml:"command,omitempty" json:"command,omitempty" toml:"command,omitempty"`
	Kind        string `yaml:"kind,omitempty" json:"kind,omitempty" toml:"kind,omitempty"`
	Mode        uint32 `yaml:"mode,omitempty" json:"mode,omitempty" toml:"mode,omitempty"`
}

Configuration for konfig.

type Secrets

type Secrets struct {
	Files map[string]string `yaml:"files,omitempty" json:"files,omitempty" toml:"files,omitempty"`
	Path  string            `yaml:"path,omitempty" json:"path,omitempty" toml:"path,omitempty"`
	Mode  uint32            `yaml:"mode,omitempty" json:"mode,omitempty" toml:"mode,omitempty"`
}

Secrets for konfig.

type ServiceClientParams

type ServiceClientParams struct {
	fx.In

	Lifecycle fx.Lifecycle
	Tracer    trace.Tracer
	Meter     metric.Meter
	ID        id.Generator
	Client    *Config
	Logger    *zap.Logger
	Generator token.Generator
	UserAgent env.UserAgent
}

ServiceClientParams for konfig.

Directories

Path Synopsis
konfig
v1

Jump to

Keyboard shortcuts

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