resource

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

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

Resource the dao layer of resource for database CRUD

func (Resource) Create

func (r Resource) Create(obj interface{}, params map[string]string) error

Create insert a data record to the database

func (Resource) Delete

func (r Resource) Delete(_ interface{}) error

Delete Resource does not implement this method

func (Resource) Get

func (r Resource) Get(cols map[string]string) (interface{}, error)

Get the resource from database and filter by cols

func (Resource) GetByPrimaryKey

func (r Resource) GetByPrimaryKey(id string) (interface{}, error)

GetByPrimaryKey get the resource by the primary key (id)

func (Resource) GetList

func (r Resource) GetList(cols map[string]string) (interface{}, error)

GetList get resource list, and filter by cols

func (Resource) GetListByStatusSets

func (r Resource) GetListByStatusSets(_ sets.String) (interface{}, error)

GetListByStatusSets Resource does not implement this method

func (Resource) Update

func (r Resource) Update(obj interface{}, cols ...string) error

Update the resource to the database with cols

func (Resource) UpdateStatusMsg

func (r Resource) UpdateStatusMsg(_ interface{}, _, _ string) error

UpdateStatusMsg Resource does not implement this method

Jump to

Keyboard shortcuts

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