models

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllEnvironments = Environments{
	Sandbox, Test, Staging, Prod,
}

Functions

This section is empty.

Types

type ClientID

type ClientID struct {
	Identifier   uuid.UUID              `yaml:"-,omitempty"`
	Name         string                 `yaml:""`
	Description  string                 `yaml:",omitempty"`
	Owner        string                 `yaml:""`
	Environments Environments           `yaml:",flow,omitempty"`
	NotBefore    time.Time              `yaml:"notBefore,omitempty"`
	Expires      time.Time              `yaml:",omitempty"`
	Properties   map[string]interface{} `yaml:",omitempty"`
}

func FromContext

func FromContext(ctx context.Context) (*ClientID, bool)

func (*ClientID) EmbedIntoContext

func (cid *ClientID) EmbedIntoContext(parent context.Context) context.Context

func (*ClientID) ExtractProperty

func (cid *ClientID) ExtractProperty(key string, value interface{}) error

func (*ClientID) IsEmpty

func (cid *ClientID) IsEmpty() bool

type ClientIDs

type ClientIDs map[uuid.UUID]ClientID

type Environment

type Environment string
const (
	Sandbox Environment = "sandbox"
	Test    Environment = "test"
	Staging Environment = "staging"
	Prod    Environment = "prod"
)

func (Environment) Validate

func (e Environment) Validate() error

type EnvironmentMask added in v0.6.1

type EnvironmentMask uint8

func (EnvironmentMask) Disjoint added in v0.6.1

func (mask EnvironmentMask) Disjoint(other EnvironmentMask) bool

type Environments

type Environments []Environment

func (Environments) Contains

func (envs Environments) Contains(e Environment) bool

func (Environments) Mask added in v0.6.1

func (envs Environments) Mask() EnvironmentMask

Jump to

Keyboard shortcuts

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