Documentation ¶
Index ¶
- type TOOrigin
- func (origin *TOOrigin) Create() (error, error, int)
- func (origin *TOOrigin) Delete() (error, error, int)
- func (origin *TOOrigin) GetAuditName() string
- func (origin TOOrigin) GetKeyFieldsInfo() []api.KeyFieldInfo
- func (origin TOOrigin) GetKeys() (map[string]interface{}, bool)
- func (origin *TOOrigin) GetTenantID(tx *sqlx.Tx) (*int, bool, error)
- func (origin *TOOrigin) GetType() string
- func (origin *TOOrigin) IsTenantAuthorized(user *auth.CurrentUser) (bool, error)
- func (origin *TOOrigin) Read(h http.Header, useIMS bool) ([]interface{}, error, error, int, *time.Time)
- func (origin *TOOrigin) SetID(i int)
- func (origin *TOOrigin) SetKeys(keys map[string]interface{})
- func (origin *TOOrigin) Update(h http.Header) (error, error, int)
- func (origin *TOOrigin) Validate() (error, error)
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 ¶
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 ¶
The Origin implementation of the Deleter interface all implementations of Deleter should use transactions and return the proper errorType
func (*TOOrigin) GetAuditName ¶
func (TOOrigin) GetKeyFieldsInfo ¶
func (origin TOOrigin) GetKeyFieldsInfo() []api.KeyFieldInfo
func (*TOOrigin) GetTenantID ¶
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) IsTenantAuthorized ¶
func (origin *TOOrigin) IsTenantAuthorized(user *auth.CurrentUser) (bool, error)
func (*TOOrigin) Update ¶
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