account

package
v0.0.0-...-35d729d Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2019 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAccountHandler

func DeleteAccountHandler(c *gin.Context)

DeleteAccountHandler removes one account.

func FindAccounts

func FindAccounts() *[]FindAccountResponse

FindAccounts finds all accounts in the database.

func FindMatchAccountByID

func FindMatchAccountByID(c *gin.Context, id string) *match.GetMatchAccountByIDResponse

FindMatchAccountByID takes another service's account.

func GetAccountByIDHandler

func GetAccountByIDHandler(c *gin.Context)

GetAccountByIDHandler finds one account.

func GetAccountsHandler

func GetAccountsHandler(c *gin.Context)

GetAccountsHandler finds all accounts.

func LogInHandler

func LogInHandler(c *gin.Context)

LogInHandler verifies the account and returns token.

func PostAccountHandler

func PostAccountHandler(c *gin.Context)

PostAccountHandler creates one account.

Types

type CreateAccountDTO

type CreateAccountDTO struct {
	Email    string     `json:"email" binding:"required"`
	Name     string     `json:"name" binding:"required"`
	Password string     `json:"password" binding:"required"`
	MatchID  *uuid.UUID `json:"matchId"`
}

CreateAccountDTO is a data transfer object.

type FindAccountResponse

type FindAccountResponse struct {
	ID        uuid.UUID  `json:"id"`
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
	DeletedAt *time.Time `json:"deletedAt"`
	Email     string     `json:"email"`
	Name      string     `json:"name"`
	MatchID   *uuid.UUID `json:"matchId"`
}

FindAccountResponse is a response object.

func FindAccountByID

func FindAccountByID(id string) *FindAccountResponse

FindAccountByID finds one account by id in the database.

type LogInDTO

type LogInDTO struct {
	Email    string `json:"email" binding:"required"`
	Password string `json:"password" binding:"required"`
}

LogInDTO is a data transfer object.

Jump to

Keyboard shortcuts

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