Documentation ¶
Index ¶
- Constants
- type API
- func (a *API) ApplyUpdatersToUserByID(userID string, updaters []UserUpdater) (*user.User, error)
- func (a *API) ApplyUpdatersToUserByObject(updateUser *user.User, updaters []UserUpdater) (*user.User, error)
- func (a *API) CheckToken(token string) (*Token, error)
- func (a *API) DeleteDataSet(dataSetID string) error
- func (a *API) DeleteUserByID(userID string, password string) error
- func (a *API) FindUsers(query *UsersQuery) ([]*user.User, error)
- func (a *API) GetUserByEmail(email string) (*user.User, error)
- func (a *API) GetUserByID(userID string) (*user.User, error)
- func (a *API) IsSessionUserID(userID string) bool
- func (a *API) ListDataSets(userID string, filter *Filter, pagination *Pagination) (*ResponseArray, error)
- func (a *API) Login(email string, password string) (*user.User, error)
- func (a *API) Logout() error
- func (a *API) RefreshToken() (*Token, error)
- func (a *API) ServerLogin() error
- func (a *API) UpdateUserByID(userID string, userUpdates *UserUpdates) (*user.User, error)
- func (a *API) UpdateUserByObject(updateUser *user.User, userUpdates *UserUpdates) (*user.User, error)
- type AddRolesUserUpdater
- type Error
- type Filter
- type Meta
- type Pagination
- type RemoveRolesUserUpdater
- type ResponseArray
- type ResponseObject
- type Session
- type Source
- type Token
- type Trace
- type UserDelete
- type UserUpdater
- type UserUpdates
- type UsersQuery
Constants ¶
View Source
const ( ConfigDirectoryName = ".tidepool" SessionFileName = "session" )
View Source
const ( TidepoolServerName = "X-Tidepool-Server-Name" TidepoolServerSecret = "X-Tidepool-Server-Secret" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Name string Endpoint string Writer io.Writer Verbose bool // contains filtered or unexported fields }
func (*API) ApplyUpdatersToUserByID ¶ added in v1.2.0
func (*API) ApplyUpdatersToUserByObject ¶ added in v1.2.0
func (*API) DeleteDataSet ¶ added in v1.28.0
func (*API) DeleteUserByID ¶ added in v1.2.0
func (*API) FindUsers ¶ added in v1.2.0
func (a *API) FindUsers(query *UsersQuery) ([]*user.User, error)
func (*API) GetUserByEmail ¶ added in v1.2.0
func (*API) GetUserByID ¶ added in v1.2.0
func (*API) IsSessionUserID ¶ added in v1.2.0
func (*API) ListDataSets ¶ added in v1.28.0
func (a *API) ListDataSets(userID string, filter *Filter, pagination *Pagination) (*ResponseArray, error)
func (*API) RefreshToken ¶
func (*API) ServerLogin ¶
func (*API) UpdateUserByID ¶ added in v1.2.0
func (*API) UpdateUserByObject ¶ added in v1.2.0
type AddRolesUserUpdater ¶ added in v1.2.0
type AddRolesUserUpdater struct {
Roles []string
}
func NewAddRolesUserUpdater ¶ added in v1.2.0
func NewAddRolesUserUpdater(roles []string) (*AddRolesUserUpdater, error)
func (*AddRolesUserUpdater) Update ¶ added in v1.2.0
func (a *AddRolesUserUpdater) Update(updateUser *user.User, userUpdates *UserUpdates) error
type Pagination ¶
type RemoveRolesUserUpdater ¶ added in v1.2.0
type RemoveRolesUserUpdater struct {
Roles []string
}
func NewRemoveRolesUserUpdater ¶ added in v1.2.0
func NewRemoveRolesUserUpdater(roles []string) (*RemoveRolesUserUpdater, error)
func (*RemoveRolesUserUpdater) Update ¶ added in v1.2.0
func (r *RemoveRolesUserUpdater) Update(updateUser *user.User, userUpdates *UserUpdates) error
type ResponseArray ¶
type ResponseObject ¶
type UserDelete ¶ added in v1.2.0
type UserDelete struct {
Password *string `json:"password,omitempty"`
}
type UserUpdater ¶ added in v1.2.0
type UserUpdater interface {
Update(updateUser *user.User, userUpdates *UserUpdates) error
}
type UserUpdates ¶ added in v1.2.0
type UserUpdates struct { Username *string `json:"username,omitempty"` Emails *[]string `json:"emails,omitempty"` Password *string `json:"password,omitempty"` Roles *[]string `json:"roles,omitempty"` TermsAccepted *string `json:"termsAccepted,omitempty"` EmailVerified *bool `json:"emailVerified,omitempty"` }
func (*UserUpdates) HasUpdates ¶ added in v1.2.0
func (u *UserUpdates) HasUpdates() bool
type UsersQuery ¶ added in v1.2.0
type UsersQuery struct {
Role *string `json:"role,omitempty"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.