user

package
v2.14.10+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEndpoint

func AddEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userProvider provider.UserProvider, memberProvider provider.ProjectMemberProvider, privilegedMemberProvider provider.PrivilegedProjectMemberProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

AddEndpoint adds the given user to the given group within the given project

func DecodeAddReq

func DecodeAddReq(c context.Context, r *http.Request) (interface{}, error)

DecodeAddReq decodes an HTTP request into AddReq

func DecodeDeleteReq

func DecodeDeleteReq(c context.Context, r *http.Request) (interface{}, error)

DecodeDeleteReq decodes an HTTP request into DeleteReq

func DecodeEditReq

func DecodeEditReq(c context.Context, r *http.Request) (interface{}, error)

DecodeEditReq decodes an HTTP request into EditReq

func DecodePatchSettingsReq

func DecodePatchSettingsReq(c context.Context, r *http.Request) (interface{}, error)

DecodePatchSettingsReq decodes an HTTP request into PatchSettingsReq

func DeleteEndpoint

func DeleteEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userProvider provider.UserProvider, memberProvider provider.ProjectMemberProvider, privilegedMemberProvider provider.PrivilegedProjectMemberProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

DeleteEndpoint deletes the given user/member from the given project

func EditEndpoint

func EditEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userProvider provider.UserProvider, memberProvider provider.ProjectMemberProvider, privilegedMemberProvider provider.PrivilegedProjectMemberProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

EditEndpoint changes the group the given user/member belongs in the given project

func GetEndpoint

func GetEndpoint(memberMapper provider.ProjectMemberMapper) endpoint.Endpoint

GetEndpoint returns info about the current user

func GetSettingsEndpoint

func GetSettingsEndpoint(memberMapper provider.ProjectMemberMapper) endpoint.Endpoint

GetSettingsEndpoint returns settings of the current user

func ListEndpoint

func ListEndpoint(projectProvider provider.ProjectProvider, privilegedProjectProvider provider.PrivilegedProjectProvider, userProvider provider.UserProvider, memberProvider provider.ProjectMemberProvider, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

ListEndpoint returns user/members of the given project

func LogoutEndpoint

func LogoutEndpoint(userProvider provider.UserProvider) endpoint.Endpoint

LogoutEndpoint

func PatchSettingsEndpoint

func PatchSettingsEndpoint(userProvider provider.UserProvider) endpoint.Endpoint

PatchSettingsEndpoint patches settings of the current user

Types

type AddReq

type AddReq struct {
	common.ProjectReq
	// in: body
	Body apiv1.User
}

AddReq defines HTTP request for addUserToProject swagger:parameters addUserToProject

func (AddReq) Validate

func (r AddReq) Validate(authenticatesUserInfo *provider.UserInfo) error

Validate validates AddReq request

type DeleteReq

type DeleteReq struct {
	common.ProjectReq
	IDReq
}

DeleteReq defines HTTP request for deleteUserFromProject swagger:parameters deleteUserFromProject

type EditReq

type EditReq struct {
	AddReq
	IDReq
}

EditReq defines HTTP request for editUserInProject swagger:parameters editUserInProject

func (EditReq) Validate

func (r EditReq) Validate(authenticatesUserInfo *provider.UserInfo) error

Validate validates EditUserToProject request

type IDReq

type IDReq struct {
	// in: path
	UserID string `json:"user_id"`
}

IDReq represents a request that contains userID in the path

type PatchSettingsReq

type PatchSettingsReq struct {
	// in: body
	Patch json.RawMessage
}

PatchSettingsReq defines HTTP request for patchCurrentUserSettings swagger:parameters patchCurrentUserSettings

Jump to

Keyboard shortcuts

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