faas-cli: github.com/openfaas/faas-cli/flags Index | Files

package flags

import "github.com/openfaas/faas-cli/flags"

Index

Package Files

log_format.go time_format.go timestamp.go

type LogFormat Uses

type LogFormat string

LogFormat determines the output format of the log stream

const JSONLogFormat LogFormat = "json"
const KeyValueLogFormat LogFormat = "keyvalue"
const PlainLogFormat LogFormat = "plain"

func (*LogFormat) Set Uses

func (l *LogFormat) Set(value string) error

Set implements pflag.Value

func (*LogFormat) String Uses

func (l *LogFormat) String() string

String implements Stringer

func (*LogFormat) Type Uses

func (l *LogFormat) Type() string

Type implements pflag.Value

type TimeFormat Uses

type TimeFormat string

TimeFormat is a timestamp format string that also accepts the following RFC names as shortcuts

 ANSIC       = "Mon Jan _2 15:04:05 2006"
	UnixDate    = "Mon Jan _2 15:04:05 MST 2006"
	RubyDate    = "Mon Jan 02 15:04:05 -0700 2006"
	RFC822      = "02 Jan 06 15:04 MST"
	RFC822Z     = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone
	RFC850      = "Monday, 02-Jan-06 15:04:05 MST"
	RFC1123     = "Mon, 02 Jan 2006 15:04:05 MST"
	RFC1123Z    = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone
	RFC3339     = "2006-01-02T15:04:05Z07:00"
	RFC3339Nano = "2006-01-02T15:04:05.999999999Z07:00"

Any string is accepted

func (*TimeFormat) Set Uses

func (l *TimeFormat) Set(value string) error

Set implements pflag.Value

func (*TimeFormat) String Uses

func (l *TimeFormat) String() string

String implements Stringer

func (*TimeFormat) Type Uses

func (l *TimeFormat) Type() string

Type implements pflag.Value

type TimestampFlag Uses

type TimestampFlag string

TimestampFlag implements the Value interface to accept and validate a RFC3339 timestamp string as a flag

func (TimestampFlag) AsTime Uses

func (t TimestampFlag) AsTime() time.Time

AsTime returns the underlying time instance

func (*TimestampFlag) Set Uses

func (t *TimestampFlag) Set(value string) error

Set implements pflag.Value

func (*TimestampFlag) String Uses

func (t *TimestampFlag) String() string

String implements Stringer

func (*TimestampFlag) Type Uses

func (t *TimestampFlag) Type() string

Type implements pflag.Value

Package flags imports 3 packages (graph) and is imported by 2 packages. Updated 2019-09-07. Refresh now. Tools for package owners.