Result

package
v0.0.0-...-709a01c Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: BSD-3-Clause Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Payload() interface{}
	HasError() bool
	Error() Error.Interface
}

func New

func New(options ...Option) Interface

Create a new result.

type Option

type Option func(*data)

func WithError

func WithError(error Error.Interface) Option

Functional parameter to set the result error.

func WithPayload

func WithPayload(payload interface{}) Option

Functional parameter to set the result payload.

Jump to

Keyboard shortcuts

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