enum

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSource

func CheckSource(s interface{}, targets ...Source) (_ bool, err error)

func CheckStatus

func CheckStatus(s interface{}, targets ...Status) (_ bool, err error)

func ValidProtocol

func ValidProtocol(s interface{}) bool

func ValidSource

func ValidSource(s interface{}) bool

func ValidStatus

func ValidStatus(s interface{}) bool

Types

type Direction

type Direction uint8
const (
	DirectionUnknown Direction = iota
	DirectionIncoming
	DirectionOutgoing
	DirectionAny
)

func ParseDirection

func ParseDirection(s interface{}) (Direction, error)

func (Direction) MarshalJSON

func (d Direction) MarshalJSON() ([]byte, error)

func (*Direction) Scan

func (d *Direction) Scan(src interface{}) (err error)

func (Direction) String

func (d Direction) String() string

func (*Direction) UnmarshalJSON

func (d *Direction) UnmarshalJSON(b []byte) (err error)

func (Direction) Value

func (d Direction) Value() (driver.Value, error)

func (Direction) Verbose

func (d Direction) Verbose() string

type Protocol

type Protocol uint8
const (
	ProtocolUnknown Protocol = iota
	ProtocolTRISA
	ProtocolTRP
	ProtocolSunrise
)

func ParseProtocol

func ParseProtocol(s interface{}) (Protocol, error)

func (Protocol) MarshalJSON

func (p Protocol) MarshalJSON() ([]byte, error)

func (*Protocol) Scan

func (p *Protocol) Scan(src interface{}) (err error)

func (Protocol) String

func (p Protocol) String() string

func (*Protocol) UnmarshalJSON

func (p *Protocol) UnmarshalJSON(b []byte) (err error)

func (Protocol) Value

func (p Protocol) Value() (driver.Value, error)

type Source

type Source uint8
const (
	SourceUnknown Source = iota
	SourceDirectorySync
	SourceUserEntry
	SourcePeer
	SourceLocal
	SourceRemote
)

func ParseSource

func ParseSource(s interface{}) (Source, error)

func (Source) MarshalJSON

func (s Source) MarshalJSON() ([]byte, error)

func (*Source) Scan

func (s *Source) Scan(src interface{}) (err error)

func (Source) String

func (s Source) String() string

func (*Source) UnmarshalJSON

func (s *Source) UnmarshalJSON(b []byte) (err error)

func (Source) Value

func (s Source) Value() (driver.Value, error)

type Status

type Status uint8
const (
	StatusUnspecified Status = iota
	StatusDraft
	StatusPending
	StatusReview
	StatusRepair
	StatusAccepted
	StatusCompleted
	StatusRejected
)

func ParseStatus

func ParseStatus(s interface{}) (Status, error)

func (Status) MarshalJSON

func (s Status) MarshalJSON() ([]byte, error)

func (*Status) Scan

func (s *Status) Scan(src interface{}) (err error)

func (Status) String

func (s Status) String() string

func (*Status) UnmarshalJSON

func (s *Status) UnmarshalJSON(b []byte) (err error)

func (Status) Value

func (s Status) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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