user

package
v0.0.0-...-dca2783 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "user"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [23]string{"roles", "upload photo", "download photo", "login", "recovery lookup", "recovery", "resume", "logout", "refresh", "send validation", "validate", "add", "update", "change password", "accept tnc", "get current", "list by project", "issue transmission token", "project roles", "admin terms and conditions", "admin delete", "admin search", "mentionables"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func MakeBadRequest

func MakeBadRequest(err error) *goa.ServiceError

MakeBadRequest builds a goa.ServiceError from an error.

func MakeForbidden

func MakeForbidden(err error) *goa.ServiceError

MakeForbidden builds a goa.ServiceError from an error.

func MakeNotFound

func MakeNotFound(err error) *goa.ServiceError

MakeNotFound builds a goa.ServiceError from an error.

func MakeUnauthorized

func MakeUnauthorized(err error) *goa.ServiceError

MakeUnauthorized builds a goa.ServiceError from an error.

func MakeUserEmailRegistered

func MakeUserEmailRegistered(err error) *goa.ServiceError

MakeUserEmailRegistered builds a goa.ServiceError from an error.

func MakeUserUnverified

func MakeUserUnverified(err error) *goa.ServiceError

MakeUserUnverified builds a goa.ServiceError from an error.

func NewAcceptTncEndpoint

func NewAcceptTncEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewAcceptTncEndpoint returns an endpoint function that calls the method "accept tnc" of service "user".

func NewAddEndpoint

func NewAddEndpoint(s Service) goa.Endpoint

NewAddEndpoint returns an endpoint function that calls the method "add" of service "user".

func NewAdminDeleteEndpoint

func NewAdminDeleteEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewAdminDeleteEndpoint returns an endpoint function that calls the method "admin delete" of service "user".

func NewAdminSearchEndpoint

func NewAdminSearchEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewAdminSearchEndpoint returns an endpoint function that calls the method "admin search" of service "user".

func NewAdminTermsAndConditionsEndpoint

func NewAdminTermsAndConditionsEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewAdminTermsAndConditionsEndpoint returns an endpoint function that calls the method "admin terms and conditions" of service "user".

func NewChangePasswordEndpoint

func NewChangePasswordEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewChangePasswordEndpoint returns an endpoint function that calls the method "change password" of service "user".

func NewDownloadPhotoEndpoint

func NewDownloadPhotoEndpoint(s Service) goa.Endpoint

NewDownloadPhotoEndpoint returns an endpoint function that calls the method "download photo" of service "user".

func NewGetCurrentEndpoint

func NewGetCurrentEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewGetCurrentEndpoint returns an endpoint function that calls the method "get current" of service "user".

func NewIssueTransmissionTokenEndpoint

func NewIssueTransmissionTokenEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewIssueTransmissionTokenEndpoint returns an endpoint function that calls the method "issue transmission token" of service "user".

func NewListByProjectEndpoint

func NewListByProjectEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewListByProjectEndpoint returns an endpoint function that calls the method "list by project" of service "user".

func NewLoginEndpoint

func NewLoginEndpoint(s Service) goa.Endpoint

NewLoginEndpoint returns an endpoint function that calls the method "login" of service "user".

func NewLogoutEndpoint

func NewLogoutEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewLogoutEndpoint returns an endpoint function that calls the method "logout" of service "user".

func NewMentionablesEndpoint

func NewMentionablesEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewMentionablesEndpoint returns an endpoint function that calls the method "mentionables" of service "user".

func NewProjectRolesEndpoint

func NewProjectRolesEndpoint(s Service) goa.Endpoint

NewProjectRolesEndpoint returns an endpoint function that calls the method "project roles" of service "user".

func NewRecoveryEndpoint

func NewRecoveryEndpoint(s Service) goa.Endpoint

NewRecoveryEndpoint returns an endpoint function that calls the method "recovery" of service "user".

func NewRecoveryLookupEndpoint

func NewRecoveryLookupEndpoint(s Service) goa.Endpoint

NewRecoveryLookupEndpoint returns an endpoint function that calls the method "recovery lookup" of service "user".

func NewRefreshEndpoint

func NewRefreshEndpoint(s Service) goa.Endpoint

NewRefreshEndpoint returns an endpoint function that calls the method "refresh" of service "user".

func NewResumeEndpoint

func NewResumeEndpoint(s Service) goa.Endpoint

NewResumeEndpoint returns an endpoint function that calls the method "resume" of service "user".

func NewRolesEndpoint

func NewRolesEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewRolesEndpoint returns an endpoint function that calls the method "roles" of service "user".

func NewSendValidationEndpoint

func NewSendValidationEndpoint(s Service) goa.Endpoint

NewSendValidationEndpoint returns an endpoint function that calls the method "send validation" of service "user".

func NewUpdateEndpoint

func NewUpdateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewUpdateEndpoint returns an endpoint function that calls the method "update" of service "user".

func NewUploadPhotoEndpoint

func NewUploadPhotoEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewUploadPhotoEndpoint returns an endpoint function that calls the method "upload photo" of service "user".

func NewValidateEndpoint

func NewValidateEndpoint(s Service) goa.Endpoint

NewValidateEndpoint returns an endpoint function that calls the method "validate" of service "user".

func NewViewedAvailableRoles

func NewViewedAvailableRoles(res *AvailableRoles, view string) *userviews.AvailableRoles

NewViewedAvailableRoles initializes viewed result type AvailableRoles from result type AvailableRoles using the given view.

func NewViewedDownloadedPhoto

func NewViewedDownloadedPhoto(res *DownloadedPhoto, view string) *userviews.DownloadedPhoto

NewViewedDownloadedPhoto initializes viewed result type DownloadedPhoto from result type DownloadedPhoto using the given view.

func NewViewedMentionableOptions

func NewViewedMentionableOptions(res *MentionableOptions, view string) *userviews.MentionableOptions

NewViewedMentionableOptions initializes viewed result type MentionableOptions from result type MentionableOptions using the given view.

func NewViewedProjectRoleCollection

func NewViewedProjectRoleCollection(res ProjectRoleCollection, view string) userviews.ProjectRoleCollection

NewViewedProjectRoleCollection initializes viewed result type ProjectRoleCollection from result type ProjectRoleCollection using the given view.

func NewViewedProjectUsers

func NewViewedProjectUsers(res *ProjectUsers, view string) *userviews.ProjectUsers

NewViewedProjectUsers initializes viewed result type ProjectUsers from result type ProjectUsers using the given view.

func NewViewedTransmissionToken

func NewViewedTransmissionToken(res *TransmissionToken, view string) *userviews.TransmissionToken

NewViewedTransmissionToken initializes viewed result type TransmissionToken from result type TransmissionToken using the given view.

func NewViewedUser

func NewViewedUser(res *User, view string) *userviews.User

NewViewedUser initializes viewed result type User from result type User using the given view.

Types

type AcceptTncFields

type AcceptTncFields struct {
	Accept bool
}

type AcceptTncPayload

type AcceptTncPayload struct {
	Auth   string
	UserID int32
	Accept *AcceptTncFields
}

AcceptTncPayload is the payload type of the user service accept tnc method.

type AddPayload

type AddPayload struct {
	User *AddUserFields
}

AddPayload is the payload type of the user service add method.

type AddUserFields

type AddUserFields struct {
	Name        string
	Email       string
	Password    string
	InviteToken *string
	TncAccept   *bool
}

type AdminDeleteFields

type AdminDeleteFields struct {
	Email    string
	Password string
}

type AdminDeletePayload

type AdminDeletePayload struct {
	Auth   string
	Delete *AdminDeleteFields
}

AdminDeletePayload is the payload type of the user service admin delete method.

type AdminSearchPayload

type AdminSearchPayload struct {
	Auth  string
	Query string
}

AdminSearchPayload is the payload type of the user service admin search method.

type AdminSearchResult

type AdminSearchResult struct {
	Users UserCollection
}

AdminSearchResult is the result type of the user service admin search method.

type AdminTermsAndConditionsFields

type AdminTermsAndConditionsFields struct {
	Email string
}

type AdminTermsAndConditionsPayload

type AdminTermsAndConditionsPayload struct {
	Auth   string
	Update *AdminTermsAndConditionsFields
}

AdminTermsAndConditionsPayload is the payload type of the user service admin terms and conditions method.

type Auther

type Auther interface {
	// JWTAuth implements the authorization logic for the JWT security scheme.
	JWTAuth(ctx context.Context, token string, schema *security.JWTScheme) (context.Context, error)
}

Auther defines the authorization functions to be implemented by the service.

type AvailableRole

type AvailableRole struct {
	ID   int32
	Name string
}

type AvailableRoles

type AvailableRoles struct {
	Roles []*AvailableRole
}

AvailableRoles is the result type of the user service roles method.

func NewAvailableRoles

func NewAvailableRoles(vres *userviews.AvailableRoles) *AvailableRoles

NewAvailableRoles initializes result type AvailableRoles from viewed result type AvailableRoles.

type ChangePasswordPayload

type ChangePasswordPayload struct {
	Auth   string
	UserID int32
	Change *UpdateUserPasswordFields
}

ChangePasswordPayload is the payload type of the user service change password method.

type Client

type Client struct {
	RolesEndpoint                   goa.Endpoint
	UploadPhotoEndpoint             goa.Endpoint
	DownloadPhotoEndpoint           goa.Endpoint
	LoginEndpoint                   goa.Endpoint
	RecoveryLookupEndpoint          goa.Endpoint
	RecoveryEndpoint                goa.Endpoint
	ResumeEndpoint                  goa.Endpoint
	LogoutEndpoint                  goa.Endpoint
	RefreshEndpoint                 goa.Endpoint
	SendValidationEndpoint          goa.Endpoint
	ValidateEndpoint                goa.Endpoint
	AddEndpoint                     goa.Endpoint
	UpdateEndpoint                  goa.Endpoint
	ChangePasswordEndpoint          goa.Endpoint
	AcceptTncEndpoint               goa.Endpoint
	GetCurrentEndpoint              goa.Endpoint
	ListByProjectEndpoint           goa.Endpoint
	IssueTransmissionTokenEndpoint  goa.Endpoint
	ProjectRolesEndpoint            goa.Endpoint
	AdminTermsAndConditionsEndpoint goa.Endpoint
	AdminDeleteEndpoint             goa.Endpoint
	AdminSearchEndpoint             goa.Endpoint
	MentionablesEndpoint            goa.Endpoint
}

Client is the "user" service client.

func NewClient

func NewClient(roles, uploadPhoto, downloadPhoto, login, recoveryLookup, recovery, resume, logout, refresh, sendValidation, validate, add, update, changePassword, acceptTnc, getCurrent, listByProject, issueTransmissionToken, projectRoles, adminTermsAndConditions, adminDelete, adminSearch, mentionables goa.Endpoint) *Client

NewClient initializes a "user" service client given the endpoints.

func (*Client) AcceptTnc

func (c *Client) AcceptTnc(ctx context.Context, p *AcceptTncPayload) (res *User, err error)

AcceptTnc calls the "accept tnc" endpoint of the "user" service.

func (*Client) Add

func (c *Client) Add(ctx context.Context, p *AddPayload) (res *User, err error)

Add calls the "add" endpoint of the "user" service.

func (*Client) AdminDelete

func (c *Client) AdminDelete(ctx context.Context, p *AdminDeletePayload) (err error)

AdminDelete calls the "admin delete" endpoint of the "user" service.

func (*Client) AdminSearch

func (c *Client) AdminSearch(ctx context.Context, p *AdminSearchPayload) (res *AdminSearchResult, err error)

AdminSearch calls the "admin search" endpoint of the "user" service.

func (*Client) AdminTermsAndConditions

func (c *Client) AdminTermsAndConditions(ctx context.Context, p *AdminTermsAndConditionsPayload) (err error)

AdminTermsAndConditions calls the "admin terms and conditions" endpoint of the "user" service.

func (*Client) ChangePassword

func (c *Client) ChangePassword(ctx context.Context, p *ChangePasswordPayload) (res *User, err error)

ChangePassword calls the "change password" endpoint of the "user" service.

func (*Client) DownloadPhoto

func (c *Client) DownloadPhoto(ctx context.Context, p *DownloadPhotoPayload) (res *DownloadedPhoto, err error)

DownloadPhoto calls the "download photo" endpoint of the "user" service.

func (*Client) GetCurrent

func (c *Client) GetCurrent(ctx context.Context, p *GetCurrentPayload) (res *User, err error)

GetCurrent calls the "get current" endpoint of the "user" service.

func (*Client) IssueTransmissionToken

func (c *Client) IssueTransmissionToken(ctx context.Context, p *IssueTransmissionTokenPayload) (res *TransmissionToken, err error)

IssueTransmissionToken calls the "issue transmission token" endpoint of the "user" service.

func (*Client) ListByProject

func (c *Client) ListByProject(ctx context.Context, p *ListByProjectPayload) (res *ProjectUsers, err error)

ListByProject calls the "list by project" endpoint of the "user" service.

func (*Client) Login

func (c *Client) Login(ctx context.Context, p *LoginPayload) (res *LoginResult, err error)

Login calls the "login" endpoint of the "user" service.

func (*Client) Logout

func (c *Client) Logout(ctx context.Context, p *LogoutPayload) (err error)

Logout calls the "logout" endpoint of the "user" service.

func (*Client) Mentionables

func (c *Client) Mentionables(ctx context.Context, p *MentionablesPayload) (res *MentionableOptions, err error)

Mentionables calls the "mentionables" endpoint of the "user" service.

func (*Client) ProjectRoles

func (c *Client) ProjectRoles(ctx context.Context) (res ProjectRoleCollection, err error)

ProjectRoles calls the "project roles" endpoint of the "user" service.

func (*Client) Recovery

func (c *Client) Recovery(ctx context.Context, p *RecoveryPayload) (err error)

Recovery calls the "recovery" endpoint of the "user" service.

func (*Client) RecoveryLookup

func (c *Client) RecoveryLookup(ctx context.Context, p *RecoveryLookupPayload) (err error)

RecoveryLookup calls the "recovery lookup" endpoint of the "user" service.

func (*Client) Refresh

func (c *Client) Refresh(ctx context.Context, p *RefreshPayload) (res *RefreshResult, err error)

Refresh calls the "refresh" endpoint of the "user" service.

func (*Client) Resume

func (c *Client) Resume(ctx context.Context, p *ResumePayload) (res *ResumeResult, err error)

Resume calls the "resume" endpoint of the "user" service.

func (*Client) Roles

func (c *Client) Roles(ctx context.Context, p *RolesPayload) (res *AvailableRoles, err error)

Roles calls the "roles" endpoint of the "user" service.

func (*Client) SendValidation

func (c *Client) SendValidation(ctx context.Context, p *SendValidationPayload) (err error)

SendValidation calls the "send validation" endpoint of the "user" service.

func (*Client) Update

func (c *Client) Update(ctx context.Context, p *UpdatePayload) (res *User, err error)

Update calls the "update" endpoint of the "user" service.

func (*Client) UploadPhoto

func (c *Client) UploadPhoto(ctx context.Context, p *UploadPhotoPayload, req io.ReadCloser) (err error)

UploadPhoto calls the "upload photo" endpoint of the "user" service.

func (*Client) Validate

func (c *Client) Validate(ctx context.Context, p *ValidatePayload) (res *ValidateResult, err error)

Validate calls the "validate" endpoint of the "user" service.

type DownloadPhotoPayload

type DownloadPhotoPayload struct {
	UserID      int32
	Size        *int32
	IfNoneMatch *string
}

DownloadPhotoPayload is the payload type of the user service download photo method.

type DownloadedPhoto

type DownloadedPhoto struct {
	Length      int64
	ContentType string
	Etag        string
	Body        []byte
}

DownloadedPhoto is the result type of the user service download photo method.

func NewDownloadedPhoto

func NewDownloadedPhoto(vres *userviews.DownloadedPhoto) *DownloadedPhoto

NewDownloadedPhoto initializes result type DownloadedPhoto from viewed result type DownloadedPhoto.

type Endpoints

type Endpoints struct {
	Roles                   goa.Endpoint
	UploadPhoto             goa.Endpoint
	DownloadPhoto           goa.Endpoint
	Login                   goa.Endpoint
	RecoveryLookup          goa.Endpoint
	Recovery                goa.Endpoint
	Resume                  goa.Endpoint
	Logout                  goa.Endpoint
	Refresh                 goa.Endpoint
	SendValidation          goa.Endpoint
	Validate                goa.Endpoint
	Add                     goa.Endpoint
	Update                  goa.Endpoint
	ChangePassword          goa.Endpoint
	AcceptTnc               goa.Endpoint
	GetCurrent              goa.Endpoint
	ListByProject           goa.Endpoint
	IssueTransmissionToken  goa.Endpoint
	ProjectRoles            goa.Endpoint
	AdminTermsAndConditions goa.Endpoint
	AdminDelete             goa.Endpoint
	AdminSearch             goa.Endpoint
	Mentionables            goa.Endpoint
}

Endpoints wraps the "user" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "user" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "user" service endpoints.

type GetCurrentPayload

type GetCurrentPayload struct {
	Auth string
}

GetCurrentPayload is the payload type of the user service get current method.

type IssueTransmissionTokenPayload

type IssueTransmissionTokenPayload struct {
	Auth string
}

IssueTransmissionTokenPayload is the payload type of the user service issue transmission token method.

type ListByProjectPayload

type ListByProjectPayload struct {
	Auth      *string
	ProjectID int32
}

ListByProjectPayload is the payload type of the user service list by project method.

type LoginFields

type LoginFields struct {
	Email    string
	Password string
}

type LoginPayload

type LoginPayload struct {
	Login *LoginFields
}

LoginPayload is the payload type of the user service login method.

type LoginResult

type LoginResult struct {
	Authorization string
}

LoginResult is the result type of the user service login method.

type LogoutPayload

type LogoutPayload struct {
	Auth string
}

LogoutPayload is the payload type of the user service logout method.

type MentionableOptions

type MentionableOptions struct {
	Users MentionableUserCollection
}

MentionableOptions is the result type of the user service mentionables method.

func NewMentionableOptions

func NewMentionableOptions(vres *userviews.MentionableOptions) *MentionableOptions

NewMentionableOptions initializes result type MentionableOptions from viewed result type MentionableOptions.

type MentionableUser

type MentionableUser struct {
	ID      int32
	Name    string
	Mention string
	Photo   *UserPhoto
}

type MentionableUserCollection

type MentionableUserCollection []*MentionableUser

type MentionablesPayload

type MentionablesPayload struct {
	Auth      string
	ProjectID *int32
	Bookmark  *string
	Query     string
}

MentionablesPayload is the payload type of the user service mentionables method.

type ProjectRole

type ProjectRole struct {
	ID   int32
	Name string
}

type ProjectRoleCollection

type ProjectRoleCollection []*ProjectRole

ProjectRoleCollection is the result type of the user service project roles method.

func NewProjectRoleCollection

func NewProjectRoleCollection(vres userviews.ProjectRoleCollection) ProjectRoleCollection

NewProjectRoleCollection initializes result type ProjectRoleCollection from viewed result type ProjectRoleCollection.

type ProjectUser

type ProjectUser struct {
	User       *User
	Role       string
	Membership string
	Invited    bool
	Accepted   bool
	Rejected   bool
}

type ProjectUserCollection

type ProjectUserCollection []*ProjectUser

type ProjectUsers

type ProjectUsers struct {
	Users ProjectUserCollection
}

ProjectUsers is the result type of the user service list by project method.

func NewProjectUsers

func NewProjectUsers(vres *userviews.ProjectUsers) *ProjectUsers

NewProjectUsers initializes result type ProjectUsers from viewed result type ProjectUsers.

type RecoveryFields

type RecoveryFields struct {
	Token    string
	Password string
}

type RecoveryLookupFields

type RecoveryLookupFields struct {
	Email string
}

type RecoveryLookupPayload

type RecoveryLookupPayload struct {
	Recovery *RecoveryLookupFields
}

RecoveryLookupPayload is the payload type of the user service recovery lookup method.

type RecoveryPayload

type RecoveryPayload struct {
	Recovery *RecoveryFields
}

RecoveryPayload is the payload type of the user service recovery method.

type RefreshPayload

type RefreshPayload struct {
	RefreshToken string
}

RefreshPayload is the payload type of the user service refresh method.

type RefreshResult

type RefreshResult struct {
	Authorization string
}

RefreshResult is the result type of the user service refresh method.

type ResumePayload

type ResumePayload struct {
	Token string
}

ResumePayload is the payload type of the user service resume method.

type ResumeResult

type ResumeResult struct {
	Authorization string
}

ResumeResult is the result type of the user service resume method.

type RolesPayload

type RolesPayload struct {
	Auth string
}

RolesPayload is the payload type of the user service roles method.

type SendValidationPayload

type SendValidationPayload struct {
	UserID int32
}

SendValidationPayload is the payload type of the user service send validation method.

type Service

type Service interface {
	// Roles implements roles.
	Roles(context.Context, *RolesPayload) (res *AvailableRoles, err error)
	// UploadPhoto implements upload photo.
	UploadPhoto(context.Context, *UploadPhotoPayload, io.ReadCloser) (err error)
	// DownloadPhoto implements download photo.
	DownloadPhoto(context.Context, *DownloadPhotoPayload) (res *DownloadedPhoto, err error)
	// Login implements login.
	Login(context.Context, *LoginPayload) (res *LoginResult, err error)
	// RecoveryLookup implements recovery lookup.
	RecoveryLookup(context.Context, *RecoveryLookupPayload) (err error)
	// Recovery implements recovery.
	Recovery(context.Context, *RecoveryPayload) (err error)
	// Resume implements resume.
	Resume(context.Context, *ResumePayload) (res *ResumeResult, err error)
	// Logout implements logout.
	Logout(context.Context, *LogoutPayload) (err error)
	// Refresh implements refresh.
	Refresh(context.Context, *RefreshPayload) (res *RefreshResult, err error)
	// SendValidation implements send validation.
	SendValidation(context.Context, *SendValidationPayload) (err error)
	// Validate implements validate.
	Validate(context.Context, *ValidatePayload) (res *ValidateResult, err error)
	// Add implements add.
	Add(context.Context, *AddPayload) (res *User, err error)
	// Update implements update.
	Update(context.Context, *UpdatePayload) (res *User, err error)
	// ChangePassword implements change password.
	ChangePassword(context.Context, *ChangePasswordPayload) (res *User, err error)
	// AcceptTnc implements accept tnc.
	AcceptTnc(context.Context, *AcceptTncPayload) (res *User, err error)
	// GetCurrent implements get current.
	GetCurrent(context.Context, *GetCurrentPayload) (res *User, err error)
	// ListByProject implements list by project.
	ListByProject(context.Context, *ListByProjectPayload) (res *ProjectUsers, err error)
	// IssueTransmissionToken implements issue transmission token.
	IssueTransmissionToken(context.Context, *IssueTransmissionTokenPayload) (res *TransmissionToken, err error)
	// ProjectRoles implements project roles.
	ProjectRoles(context.Context) (res ProjectRoleCollection, err error)
	// AdminTermsAndConditions implements admin terms and conditions.
	AdminTermsAndConditions(context.Context, *AdminTermsAndConditionsPayload) (err error)
	// AdminDelete implements admin delete.
	AdminDelete(context.Context, *AdminDeletePayload) (err error)
	// AdminSearch implements admin search.
	AdminSearch(context.Context, *AdminSearchPayload) (res *AdminSearchResult, err error)
	// Mentionables implements mentionables.
	Mentionables(context.Context, *MentionablesPayload) (res *MentionableOptions, err error)
}

Service is the user service interface.

type TransmissionToken

type TransmissionToken struct {
	Token string
	URL   string
}

TransmissionToken is the result type of the user service issue transmission token method.

func NewTransmissionToken

func NewTransmissionToken(vres *userviews.TransmissionToken) *TransmissionToken

NewTransmissionToken initializes result type TransmissionToken from viewed result type TransmissionToken.

type UpdatePayload

type UpdatePayload struct {
	Auth   string
	UserID int32
	Update *UpdateUserFields
}

UpdatePayload is the payload type of the user service update method.

type UpdateUserFields

type UpdateUserFields struct {
	Name  string
	Email string
	Bio   string
}

type UpdateUserPasswordFields

type UpdateUserPasswordFields struct {
	OldPassword string
	NewPassword string
}

type UploadPhotoPayload

type UploadPhotoPayload struct {
	Auth          string
	ContentLength int64
	ContentType   string
}

UploadPhotoPayload is the payload type of the user service upload photo method.

type UploadPhotoRequestData

type UploadPhotoRequestData struct {
	// Payload is the method payload.
	Payload *UploadPhotoPayload
	// Body streams the HTTP request body.
	Body io.ReadCloser
}

UploadPhotoRequestData holds both the payload and the HTTP request body reader of the "upload photo" method.

type User

type User struct {
	ID        int32
	Name      string
	Email     string
	Bio       string
	Photo     *UserPhoto
	Admin     bool
	UpdatedAt int64
	TncDate   int64
}

User is the result type of the user service add method.

func NewUser

func NewUser(vres *userviews.User) *User

NewUser initializes result type User from viewed result type User.

type UserCollection

type UserCollection []*User

type UserPhoto

type UserPhoto struct {
	URL *string
}

type ValidatePayload

type ValidatePayload struct {
	Token string
}

ValidatePayload is the payload type of the user service validate method.

type ValidateResult

type ValidateResult struct {
	Location string
}

ValidateResult is the result type of the user service validate method.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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