user

package
v0.0.0-...-5e7ffb8 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUserRequest

type CreateUserRequest struct {
	Email           string `json:"email" validate:"required,email"`
	Password        string `json:"password" validate:"required,alphanum,min=6"`
	ConfirmPassword string `json:"confirm_password" validate:"required,eqfield=Password"`
}

type CreateUserResponse

type CreateUserResponse struct {
	ID string `json:"id"`
}

type DeleteUserRequest

type DeleteUserRequest struct {
	ID string `json:"id"`
}

type DeleteUserResponse

type DeleteUserResponse struct {
	ID string `json:"id"`
}

type Endpoints

type Endpoints struct {
	CreateUser endpoint.Endpoint
	GetUser    endpoint.Endpoint
	UpdateUser endpoint.Endpoint
	DeleteUser endpoint.Endpoint
	ListUsers  endpoint.Endpoint
}

func MakeEndpoints

func MakeEndpoints(s user.ServiceInterface) Endpoints

type GetUserRequest

type GetUserRequest struct {
	ID string `json:"id"`
}

type GetUserResponse

type GetUserResponse struct {
	ID    string `json:"id"`
	Email string `json:"email"`
}

type ListUsersRequest

type ListUsersRequest struct{}

type ListUsersResponse

type ListUsersResponse struct {
	Users *[]user.User `json:"users"`
}

type UpdateUserRequest

type UpdateUserRequest struct {
	ID              string `json:"id"`
	Email           string `json:"email" validate:"email"`
	Password        string `json:"password" validate:"alphanum,min=6"`
	ConfirmPassword string `json:"confirm_password" validate:"required_with=Password,eqfield=Password"`
}

type UpdateUserResponse

type UpdateUserResponse struct {
	ID    string `json:"id"`
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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