user

package
v7.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 21 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(w http.ResponseWriter, r *http.Request)

func Current

func Current(w http.ResponseWriter, r *http.Request)

func Get

func Get(w http.ResponseWriter, r *http.Request)

Get is the handler for GET requests made to /users.

func InsertQueryV40

func InsertQueryV40() string

func ReplaceCurrent

func ReplaceCurrent(w http.ResponseWriter, r *http.Request)

func ReplaceCurrentV4

func ReplaceCurrentV4(w http.ResponseWriter, r *http.Request)

ReplaceCurrentV4 replaces the current user with the definition in the user's request (assuming it meets validation constraints).

func Update

func Update(w http.ResponseWriter, r *http.Request)

Update is the handler for PUT requests made to /users.

func UpdateQueryV40

func UpdateQueryV40() string

Types

type TOUser

type TOUser struct {
	api.APIInfoImpl `json:"-"`
	tc.User
}

func (*TOUser) Create

func (user *TOUser) Create() (error, error, int)

Note: Not using GenericCreate because Scan also needs to scan tenant and rolename

func (*TOUser) DeleteQuery

func (user *TOUser) DeleteQuery() string

func (TOUser) GetAuditName

func (user TOUser) GetAuditName() string

func (TOUser) GetKeyFieldsInfo

func (user TOUser) GetKeyFieldsInfo() []api.KeyFieldInfo

func (TOUser) GetKeys

func (user TOUser) GetKeys() (map[string]interface{}, bool)

func (TOUser) GetType

func (user TOUser) GetType() string

func (*TOUser) InsertQuery

func (user *TOUser) InsertQuery() string

func (*TOUser) IsTenantAuthorized

func (u *TOUser) IsTenantAuthorized(user *auth.CurrentUser) (bool, error)

func (*TOUser) NewReadObj

func (user *TOUser) NewReadObj() interface{}

func (*TOUser) ParamColumns

func (user *TOUser) ParamColumns() map[string]dbhelpers.WhereColumnInfo

func (*TOUser) Read

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

This is not using GenericRead because of this tenancy check. Maybe we can add tenancy functionality to the generic case?

func (*TOUser) SelectQuery

func (user *TOUser) SelectQuery() string

func (*TOUser) SelectQuery40

func (user *TOUser) SelectQuery40() string

func (*TOUser) SetKeys

func (user *TOUser) SetKeys(keys map[string]interface{})

func (*TOUser) SetLastUpdated

func (user *TOUser) SetLastUpdated(t tc.TimeNoMod)

func (*TOUser) Update

func (user *TOUser) Update(h http.Header) (error, error, int)

func (*TOUser) UpdateQuery

func (user *TOUser) UpdateQuery() string

func (*TOUser) Validate

func (user *TOUser) Validate() (error, error)

Jump to

Keyboard shortcuts

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