version

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 96 modules, 96 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// Method is the HTTP method this endpoint is registered for.
	Method = "GET"
	// Name identifies the endpoint. It is aligned to the package path.
	Name = "version"
	// Path is the HTTP request path this endpoint is registered for.
	Path = "/"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Config

type Config struct {
	// Dependencies.
	Logger  micrologger.Logger
	Service *version.Service
}

Config represents the configuration used to create a version endpoint.

type Endpoint

type Endpoint struct {
	Config
}

func New

func New(config Config) (*Endpoint, error)

New creates a new configured version endpoint.

func (*Endpoint) Decoder

func (e *Endpoint) Decoder() kithttp.DecodeRequestFunc

func (*Endpoint) Encoder

func (e *Endpoint) Encoder() kithttp.EncodeResponseFunc

func (*Endpoint) Endpoint

func (e *Endpoint) Endpoint() kitendpoint.Endpoint

func (*Endpoint) Method

func (e *Endpoint) Method() string

func (*Endpoint) Middlewares

func (e *Endpoint) Middlewares() []kitendpoint.Middleware

func (*Endpoint) Name

func (e *Endpoint) Name() string

func (*Endpoint) Path

func (e *Endpoint) Path() string

type Response

type Response struct {
	Description    string                 `json:"description"`
	GitCommit      string                 `json:"git_commit"`
	GoVersion      string                 `json:"go_version"`
	Name           string                 `json:"name"`
	OSArch         string                 `json:"os_arch"`
	Source         string                 `json:"source"`
	Version        string                 `json:"version"`
	VersionBundles []versionbundle.Bundle `json:"version_bundles"`
}

Response is the return value of the service action.

Jump to

Keyboard shortcuts

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