token

package
v0.0.0-...-c1cbbd5 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2015 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tokenize

func Tokenize(password string, j *JobToken) (string, error)

Types

type JobToken

type JobToken struct {
	Action      Type
	ID          string
	Region      string
	IgnoreUntil time.Time
	ValIDUntil  time.Time
}

Not very scalable but good enough for our requirements

func NewDelayJob

func NewDelayJob(region, ID string, until time.Time) *JobToken

func NewForceStopJob

func NewForceStopJob(region, ID string) *JobToken

func NewStopJob

func NewStopJob(region, ID string) *JobToken

func NewTerminateJob

func NewTerminateJob(region, ID string) *JobToken

func NewWhitelistJob

func NewWhitelistJob(region, ID string) *JobToken

func Untokenize

func Untokenize(password, t string) (j *JobToken, err error)

func (*JobToken) Equal

func (j *JobToken) Equal(j2 *JobToken) bool

func (*JobToken) Expired

func (j *JobToken) Expired() bool

func (*JobToken) JSON

func (j *JobToken) JSON() []byte

type Type

type Type int
const (
	J_DELAY Type = iota
	J_TERMINATE
	J_WHITELIST
	J_STOP
	J_FORCESTOP
)

func (Type) String

func (i Type) String() string

Jump to

Keyboard shortcuts

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