types

package
v0.0.0-...-61829c1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const STATE_OFFSET = int64(-3 - STATE__ACTIVE)

db -3 = state = 1

Variables

View Source
var InvalidState = errors.New("invalid State")
View Source
var InvalidStatus = errors.New("invalid Status")

Functions

This section is empty.

Types

type State

type State int64

swagger:enum

const (
	STATE_UNKNOWN State = iota
	STATE__ACTIVE       // 激活
	STATE__CLOSED       // 关闭
)

func ParseStateFromLabelString

func ParseStateFromLabelString(s string) (State, error)

func ParseStateFromString

func ParseStateFromString(s string) (State, error)

func (State) EnumType

func (State) EnumType() string

func (State) Enums

func (State) Enums() map[int][]string

func (State) Label

func (v State) Label() string

func (State) MarshalText

func (v State) MarshalText() ([]byte, error)

func (*State) Scan

func (v *State) Scan(src interface{}) error

func (State) String

func (v State) String() string

func (*State) UnmarshalText

func (v *State) UnmarshalText(data []byte) (err error)

func (State) Value

func (v State) Value() (driver.Value, error)

type Status

type Status int64

swagger:enum

const (
	STATUS_UNKNOWN Status = iota
	STATUS__ACTIVE        // 激活
	STATUS__CLOSED        // 关闭
)

func ParseStatusFromLabelString

func ParseStatusFromLabelString(s string) (Status, error)

func ParseStatusFromString

func ParseStatusFromString(s string) (Status, error)

func (Status) EnumType

func (Status) EnumType() string

func (Status) Enums

func (Status) Enums() map[int][]string

func (Status) Label

func (v Status) Label() string

func (Status) MarshalText

func (v Status) MarshalText() ([]byte, error)

func (Status) String

func (v Status) String() string

func (*Status) UnmarshalText

func (v *Status) UnmarshalText(data []byte) (err error)

Jump to

Keyboard shortcuts

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