Documentation ¶
Index ¶
- type Ocs
- func (o Ocs) AddGroup(w http.ResponseWriter, r *http.Request)
- func (o Ocs) AddToGroup(w http.ResponseWriter, r *http.Request)
- func (o Ocs) AddUser(w http.ResponseWriter, r *http.Request)
- func (o Ocs) DeleteGroup(w http.ResponseWriter, r *http.Request)
- func (o Ocs) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (o Ocs) DisableUser(w http.ResponseWriter, r *http.Request)
- func (o Ocs) EditUser(w http.ResponseWriter, r *http.Request)
- func (o Ocs) EnableUser(w http.ResponseWriter, r *http.Request)
- func (o Ocs) GetConfig(w http.ResponseWriter, r *http.Request)
- func (o Ocs) GetGroupMembers(w http.ResponseWriter, r *http.Request)
- func (o Ocs) GetSelf(w http.ResponseWriter, r *http.Request)
- func (o Ocs) GetSigningKey(w http.ResponseWriter, r *http.Request)
- func (o Ocs) GetUser(w http.ResponseWriter, r *http.Request)
- func (o Ocs) ListGroups(w http.ResponseWriter, r *http.Request)
- func (o Ocs) ListUserGroups(w http.ResponseWriter, r *http.Request)
- func (o Ocs) ListUsers(w http.ResponseWriter, r *http.Request)
- func (o Ocs) NotFound(w http.ResponseWriter, r *http.Request)
- func (o Ocs) NotImplementedStub(w http.ResponseWriter, r *http.Request)
- func (o Ocs) RemoveFromGroup(w http.ResponseWriter, r *http.Request)
- func (o Ocs) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type Option
- type Options
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ocs ¶
type Ocs struct { RoleService settingssvc.RoleService RoleManager *roles.Manager // contains filtered or unexported fields }
Ocs defines implements the business logic for Service.
func (Ocs) AddGroup ¶
func (o Ocs) AddGroup(w http.ResponseWriter, r *http.Request)
AddGroup adds a group oC10 implementation: https://github.com/owncloud/core/blob/762780a23c9eadda4fb5fa8db99eba66a5100b6e/apps/provisioning_api/lib/Groups.php#L126-L154
func (Ocs) AddToGroup ¶
func (o Ocs) AddToGroup(w http.ResponseWriter, r *http.Request)
AddToGroup adds a user to a group
func (Ocs) AddUser ¶
func (o Ocs) AddUser(w http.ResponseWriter, r *http.Request)
AddUser creates a new user account
func (Ocs) DeleteGroup ¶
func (o Ocs) DeleteGroup(w http.ResponseWriter, r *http.Request)
DeleteGroup deletes a group
func (Ocs) DeleteUser ¶
func (o Ocs) DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser deletes a user
func (Ocs) DisableUser ¶
func (o Ocs) DisableUser(w http.ResponseWriter, r *http.Request)
DisableUser disables a user
func (Ocs) EditUser ¶
func (o Ocs) EditUser(w http.ResponseWriter, r *http.Request)
EditUser creates a new user account
func (Ocs) EnableUser ¶
func (o Ocs) EnableUser(w http.ResponseWriter, r *http.Request)
EnableUser enables a user
func (Ocs) GetConfig ¶
func (o Ocs) GetConfig(w http.ResponseWriter, r *http.Request)
GetConfig renders the ocs config endpoint
func (Ocs) GetGroupMembers ¶
func (o Ocs) GetGroupMembers(w http.ResponseWriter, r *http.Request)
GetGroupMembers lists all members of a group
func (Ocs) GetSelf ¶
func (o Ocs) GetSelf(w http.ResponseWriter, r *http.Request)
GetSelf returns the currently logged in user
func (Ocs) GetSigningKey ¶
func (o Ocs) GetSigningKey(w http.ResponseWriter, r *http.Request)
GetSigningKey returns the signing key for the current user. It will create it on the fly if it does not exist The signing key is part of the user settings and is used by the proxy to authenticate requests Currently, the username is used as the OC-Credential
func (Ocs) GetUser ¶
func (o Ocs) GetUser(w http.ResponseWriter, r *http.Request)
GetUser returns the user with the given userid
func (Ocs) ListGroups ¶
func (o Ocs) ListGroups(w http.ResponseWriter, r *http.Request)
ListGroups lists all groups
func (Ocs) ListUserGroups ¶
func (o Ocs) ListUserGroups(w http.ResponseWriter, r *http.Request)
ListUserGroups lists a users groups
func (Ocs) ListUsers ¶
func (o Ocs) ListUsers(w http.ResponseWriter, r *http.Request)
ListUsers lists the users
func (Ocs) NotFound ¶
func (o Ocs) NotFound(w http.ResponseWriter, r *http.Request)
NotFound uses ErrRender to always return a proper OCS payload
func (Ocs) NotImplementedStub ¶
func (o Ocs) NotImplementedStub(w http.ResponseWriter, r *http.Request)
NotImplementedStub returns a not implemented error
func (Ocs) RemoveFromGroup ¶
func (o Ocs) RemoveFromGroup(w http.ResponseWriter, r *http.Request)
RemoveFromGroup removes a user from a group
type Option ¶
type Option func(o *Options)
Option defines a single option function.
func Middleware ¶
Middleware provides a function to set the middleware option.
func RoleManager ¶
RoleManager provides a function to set the RoleManager option.
func RoleService ¶
func RoleService(val settingssvc.RoleService) Option
RoleService provides a function to set the RoleService option.
type Options ¶
type Options struct { Logger log.Logger Config *config.Config Middleware []func(http.Handler) http.Handler RoleService settingssvc.RoleService RoleManager *roles.Manager }
Options defines the available options for this package.
type Service ¶
type Service interface { ServeHTTP(http.ResponseWriter, *http.Request) GetConfig(http.ResponseWriter, *http.Request) }
Service defines the service handlers.
func NewInstrument ¶
NewInstrument returns a service that instruments metrics.
func NewLogging ¶
NewLogging returns a service that logs messages.
func NewService ¶
NewService returns a service implementation for Service.
func NewTracing ¶
NewTracing returns a service that instruments traces.