okenvelope

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	L = "OK"
)

Variables

This section is empty.

Functions

func Parse

func Parse(b B) (t *T, rem B, err E)

Types

type B

type B = []byte

type Ctx

type Ctx = context.T

type E

type E = error

type N

type N = int

type S

type S = string

type T

type T struct {
	EventID *eventid.T
	OK      bool
	Reason  B
}

func New

func New() *T

func NewFrom

func NewFrom[V S | B](eid V, ok bool, msg ...B) *T

func (*T) Label

func (en *T) Label() string

func (*T) MarshalJSON

func (en *T) MarshalJSON(dst B) (b B, err error)

func (*T) ReasonString

func (en *T) ReasonString() string

func (*T) UnmarshalJSON

func (en *T) UnmarshalJSON(b B) (r B, err error)

func (*T) Write

func (en *T) Write(w io.Writer) (err E)

Jump to

Keyboard shortcuts

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