register

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

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content

func Content(to, appName, username string) string

Content get register content

func Send

func Send(to string, appName, username string) error

Send register email content

Types

type Form

type Form struct {
	Email     string `json:"email"`
	EmailCode string `json:"email_code"`
	Username  string `json:"username"`
	Password  string `json:"password"`
}

Form user register request json body

func (Form) Validate

func (f Form) Validate() *exception.MDClubGoError

Validate for register form data

type Present

type Present struct {
	*database.User
	Avatars       map[string]string `json:"avatar"`
	Covers        map[string]string `json:"cover"`
	Relationships struct {
		IsMe        bool `json:"is_me"`
		IsFollowing bool `json:"is_following"`
		IsFollowed  bool `json:"is_followed"`
	} `json:"relationships"`
	// contains filtered or unexported fields
}

Present user register response json body

func NewPresent

func NewPresent(ctx echo.Context, user *database.User) *Present

NewPresent return a *register.Present

func (Present) Format

func (p Present) Format() interface{}

Format return a response format data

Jump to

Keyboard shortcuts

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