utility

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 11 Imported by: 14

Documentation

Index

Constants

View Source
const Timeout = 1 * time.Second

Variables

This section is empty.

Functions

func DialWithOptions

func DialWithOptions(target string, secure bool) (cConn *grpc.ClientConn, err error)

func FromContext

func FromContext(ctx context.Context, key ContextKey) (string, bool)

func Load

func Load(spec any) error

func NewContext

func NewContext(ctx context.Context, key ContextKey, value string) context.Context

Types

type ContextKey

type ContextKey string
const (
	TokenContextKey ContextKey = "bearer"
	UIDContextKey   ContextKey = "uid"
)

type Deployments

type Deployments string
const (
	DeploymentsLocal Deployments = "local"
	DeploymentsDev   Deployments = "dev"
	DeploymentsProd  Deployments = "prod"
)

func ParseDeployments

func ParseDeployments(value string) Deployments

func (Deployments) String

func (d Deployments) String() string

Jump to

Keyboard shortcuts

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