confirmation

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0, BSD-2-Clause Imports: 0 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State uint8

State is the confirmation state of an entity.

const (
	// Undefined is the default confirmation state.
	Undefined State = iota

	// Rejected is the state for rejected entities.
	Rejected

	// Pending is the state for pending entities.
	Pending

	// Accepted is the state for accepted entities.
	Accepted

	// Confirmed is the state for confirmed entities.
	Confirmed
)

func (State) Aggregate

func (s State) Aggregate(o State) State

Aggregate returns the lowest confirmation state of all given states.

func (State) IsAccepted

func (s State) IsAccepted() bool

IsAccepted returns true if the state is Accepted or Confirmed.

func (State) IsConfirmed

func (s State) IsConfirmed() bool

IsConfirmed returns true if the state is Confirmed.

func (State) IsPending

func (s State) IsPending() bool

IsPending returns true if the state is Pending.

func (State) IsRejected

func (s State) IsRejected() bool

IsRejected returns true if the state is Rejected.

func (State) String

func (s State) String() (humanReadable string)

String returns a human-readable representation of the State.

Jump to

Keyboard shortcuts

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