origin

package
v5.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TOOrigin

type TOOrigin struct {
	api.APIInfoImpl `json:"-"`
	tc.Origin
}

we need a type alias to define functions on

func (*TOOrigin) Create

func (origin *TOOrigin) Create() (error, error, int)

The TOOrigin implementation of the Inserter interface all implementations of Inserter should use transactions and return the proper errorType ParsePQUniqueConstraintError is used to determine if an origin with conflicting values exists if so, it will return an errorType of DataConflict and the type should be appended to the generic error message returned The insert sql returns the id and lastUpdated values of the newly inserted origin and have to be added to the struct

func (*TOOrigin) Delete

func (origin *TOOrigin) Delete() (error, error, int)

The Origin implementation of the Deleter interface all implementations of Deleter should use transactions and return the proper errorType

func (*TOOrigin) GetAuditName

func (origin *TOOrigin) GetAuditName() string

func (TOOrigin) GetKeyFieldsInfo

func (origin TOOrigin) GetKeyFieldsInfo() []api.KeyFieldInfo

func (TOOrigin) GetKeys

func (origin TOOrigin) GetKeys() (map[string]interface{}, bool)

Implementation of the Identifier, Validator interface functions

func (*TOOrigin) GetTenantID

func (origin *TOOrigin) GetTenantID(tx *sqlx.Tx) (*int, bool, error)

GetTenantID returns a pointer to the Origin's tenant ID from the Tx, whether or not the Origin exists, and any error encountered

func (*TOOrigin) GetType

func (origin *TOOrigin) GetType() string

func (*TOOrigin) IsTenantAuthorized

func (origin *TOOrigin) IsTenantAuthorized(user *auth.CurrentUser) (bool, error)

func (*TOOrigin) Read

func (origin *TOOrigin) Read(h http.Header, useIMS bool) ([]interface{}, error, error, int, *time.Time)

func (*TOOrigin) SetID

func (origin *TOOrigin) SetID(i int)

func (*TOOrigin) SetKeys

func (origin *TOOrigin) SetKeys(keys map[string]interface{})

func (*TOOrigin) Update

func (origin *TOOrigin) Update(h http.Header) (error, error, int)

The TOOrigin implementation of the Updater interface all implementations of Updater should use transactions and return the proper errorType ParsePQUniqueConstraintError is used to determine if an origin with conflicting values exists if so, it will return an errorType of DataConflict and the type should be appended to the generic error message returned

func (*TOOrigin) Validate

func (origin *TOOrigin) Validate() error

Jump to

Keyboard shortcuts

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