crud

package
v0.0.0-...-2a3d9f8 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 6 Imported by: 2

Documentation

Overview

Package crud prodives tools to accept data from a server request or the environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field[CV crudValue] struct {
	Value   CV
	Updated bool
}

type NameCrud

type NameCrud struct {
	Address  Field[base.Address]
	Name     Field[string]
	Tags     Field[string]
	Source   Field[string]
	Symbol   Field[string]
	Decimals Field[string]
}

func CrudFromAddress

func CrudFromAddress(addr base.Address) *NameCrud

func CrudFromName

func CrudFromName(name types.Name) *NameCrud

func NewNameCrud

func NewNameCrud(requireName bool, r *http.Request) (*NameCrud, error)

func (*NameCrud) SetEnv

func (cd *NameCrud) SetEnv()

func (*NameCrud) Unsetenv

func (cd *NameCrud) Unsetenv()

func (*NameCrud) Validate

func (cd *NameCrud) Validate(requireName bool) error

type Operation

type Operation string
const (
	Create   Operation = "create"
	Update   Operation = "update"
	Delete   Operation = "delete"
	Undelete Operation = "undelete"
	Remove   Operation = "remove"
	Autoname Operation = "autoname"
)

func OpFromString

func OpFromString(op string) Operation

Jump to

Keyboard shortcuts

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