example

package
v1.0.1-0...-73e9db2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectionType

type DirectionType int

DirectionType is an Enum.

const (
	DirectionUp DirectionType = iota
	DirectionDown
	DirectionLeft
	DirectionRight
)

func DirectionTypeFromString

func DirectionTypeFromString(s string) (DirectionType, error)

DirectionTypeFromString returns a DirectionType from it's string representation.

func (DirectionType) MarshalJSON

func (v DirectionType) MarshalJSON() ([]byte, error)

MarshalJSON marshalls the DirectionType enum to it's JSON representation.

func (DirectionType) String

func (v DirectionType) String() string

func (*DirectionType) UnmarshalJSON

func (v *DirectionType) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshalls the JSON to it's DirectionType enum.

func (DirectionType) Valid

func (v DirectionType) Valid() bool

Valid returns false if the DirectionType isn't valid.

type PostType

type PostType int

PostType is an Enum.

const (
	PostCreate PostType = 0
	PostRead   PostType = 2
	PostUpdate PostType = 4
	PostDelete PostType = 8
)

func PostTypeFromString

func PostTypeFromString(s string) (PostType, error)

PostTypeFromString returns a PostType from it's string representation.

func (PostType) MarshalJSON

func (v PostType) MarshalJSON() ([]byte, error)

MarshalJSON marshalls the PostType enum to it's JSON representation.

func (PostType) String

func (v PostType) String() string

func (*PostType) UnmarshalJSON

func (v *PostType) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshalls the JSON to it's PostType enum.

func (PostType) Valid

func (v PostType) Valid() bool

Valid returns false if the PostType isn't valid.

type YesOrNo

type YesOrNo string

YesOrNo is an Enum.

const (
	AnswerYes   YesOrNo = "Y"
	AnswerNo    YesOrNo = "N"
	AnswerMaybe YesOrNo = "M"
)

func YesOrNoFromString

func YesOrNoFromString(s string) (YesOrNo, error)

YesOrNoFromString returns a YesOrNo from it's string representation.

func (YesOrNo) String

func (v YesOrNo) String() string

func (YesOrNo) Valid

func (v YesOrNo) Valid() bool

Valid returns false if the YesOrNo isn't valid.

func (YesOrNo) Value

func (v YesOrNo) Value() string

Value returns the actual value for the enum type.

Jump to

Keyboard shortcuts

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