state

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoState = fmt.Errorf("no Inngest state found")
)

Functions

This section is empty.

Types

type State

type State struct {
	client.Client `json:"-"`

	SelectedWorkspace *Workspace     `json:"workspace,omitempty"`
	Credentials       []byte         `json:"credentials"`
	Account           client.Account `json:"account"`
}

State persists across each cli invokation, allowing functionality such as workspace switching, etc.

func GetState

func GetState(ctx context.Context) (*State, error)

func RequireState

func RequireState(ctx context.Context) *State

func (State) Persist

func (s State) Persist(ctx context.Context) error

func (*State) SetWorkspace

func (s *State) SetWorkspace(ctx context.Context, w client.Workspace) error

type Workspace

type Workspace struct {
	client.Workspace

	IsOverridden bool `json:"-"`
}

Workspace represents a single workspace within an Inngest account. The pertinent fields for the active workspace are marshalled into State.

Jump to

Keyboard shortcuts

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