options

package
v0.0.2-0...-4ce78c8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PRI_M_CORE      uint16 // no  dep
	PRI_M_APISERVER        // dep  core
)

Variables

View Source
var (
	// Revision is the VCS revision associated with this build. Overridden using ldflags
	// at compile time. Example:
	// $ go build -ldflags "-X github.com/m3db/m3/src/x/instrument.Revision=abcdef" ...
	// Adapted from: https://www.atatus.com/blog/golang-auto-build-versioning/
	Revision = "unknown"

	// Branch is the VCS branch associated with this build.
	Branch = "unknown"

	// Version is the version associated with this build.
	Version = "unknown"

	// Builder is the username this build was created
	Builder = "unknown"

	// BuildDate is the date this build was created.
	BuildDate = "unknown"

	// BuildTimeUnix is the seconds since epoch representing the date this build was created.
	BuildTimeUnix = "0"

	// LogBuildInfoAtStartup controls whether we log build information at startup. If its
	// set to a non-empty string, we log the build information at process startup.
	LogBuildInfoAtStartup string
)

Functions

func InstallReporter

func InstallReporter()

func LogBuildInfo

func LogBuildInfo()

LogBuildInfo logs the build information to the provided logger.

func NewVersionCmd

func NewVersionCmd() *cobra.Command

func WithAuthn

func WithAuthn(parent context.Context, authn Authn) context.Context

WithAuthn returns a copy of parent in which the authenticationInfo value is set

func WithAuthz

func WithAuthz(parent context.Context, authz Authz) context.Context

WithAuthz returns a copy of parent in which the authorizationInfo value is set

func WithCore

func WithCore(parent context.Context, core Core) context.Context

func WithValue

func WithValue(parent context.Context, key interface{}, val interface{}) context.Context

WithValue returns a copy of parent in which the value associated with key is val.

Types

type Authn

type Authn interface {
}

func AuthnFrom

func AuthnFrom(ctx context.Context) (Authn, bool)

AuthnFrom returns the value of the authenticationInfo key on the ctx

type Authz

type Authz interface {
}

func AuthzFrom

func AuthzFrom(ctx context.Context) (Authz, bool)

AuthzFrom returns the value of the authorizationInfo key on the ctx

type Client

type Client interface {
	GetId() string
	GetSecret() string
	GetRedirectUri() string
}

type Core

type Core interface {
	Hostname() string
	ConfigFile() string
}

func CoreFrom

func CoreFrom(ctx context.Context) (Core, bool)

func CoreMustFrom

func CoreMustFrom(ctx context.Context) Core

type Executer

type Executer interface {
	Execute(wr io.Writer, data interface{}) error
}

type GenericServer

type GenericServer interface {
}

type HttpServer

type HttpServer interface {
}

type ProcVersion

type ProcVersion struct {
	Version   string `json:"version,omitempty"`
	Release   string `json:"release,omitempty"`
	Git       string `json:"git,omitempty"`
	Go        string `json:"go,omitempty"`
	Os        string `json:"os,omitempty"`
	Arch      string `json:"arch,omitempty"`
	Builder   string `json:"builder,omitempty"`
	BuildTime int64  `json:"buildTime,omitempty" out:",date"`
}

func (ProcVersion) String

func (p ProcVersion) String() string

Jump to

Keyboard shortcuts

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