callflag

package
v0.0.0-...-886a677 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ReadStates CallFlag = 1 << iota
	WriteStates
	AllowCall
	AllowNotify

	States            = ReadStates | WriteStates
	ReadOnly          = ReadStates | AllowCall
	All               = States | AllowCall | AllowNotify
	NoneFlag CallFlag = 0
)

Default flags.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallFlag

type CallFlag byte

CallFlag represents a call flag.

func FromString

func FromString(s string) (CallFlag, error)

FromString parses an input string and returns a corresponding CallFlag.

func (CallFlag) Has

func (f CallFlag) Has(cf CallFlag) bool

Has returns true iff all bits set in cf are also set in f.

func (CallFlag) MarshalJSON

func (f CallFlag) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (CallFlag) MarshalYAML

func (f CallFlag) MarshalYAML() (any, error)

MarshalYAML implements the YAML marshaler interface.

func (CallFlag) String

func (f CallFlag) String() string

String implements Stringer interface.

func (*CallFlag) UnmarshalJSON

func (f *CallFlag) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*CallFlag) UnmarshalYAML

func (f *CallFlag) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML implements the YAML unmarshaler interface.

Jump to

Keyboard shortcuts

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