controller

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(db *ent.Client, lg *zap.Logger) *Handler

func (Handler) NewError

func (h Handler) NewError(ctx context.Context, err error) *oas.ErrorStatusCode

func (Handler) Poll

func (h Handler) Poll(ctx context.Context, params oas.PollParams) (oas.Job, error)

func (Handler) Progress

func (h Handler) Progress(ctx context.Context, req *oas.Progress, params oas.ProgressParams) (*oas.Status, error)

func (Handler) Run

func (h Handler) Run(ctx context.Context) error

func (Handler) Status

func (h Handler) Status(ctx context.Context) (*oas.Status, error)

type State added in v0.2.0

type State struct {
	// contains filtered or unexported fields
}

func Ensure added in v0.2.0

func Ensure(tx *ent.Tx) *State

Ensure condition on transaction state change.

func (*State) Rollback added in v0.2.0

func (s *State) Rollback()

Rollback ensures rollback for transactions that are not done.

Jump to

Keyboard shortcuts

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