models

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 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 Environments

type Environments []Environment

func (Environments) Contains

func (envs Environments) Contains(e Environment) bool

Jump to

Keyboard shortcuts

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