web

package
v0.0.0-...-b382b42 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Code    int      `json:"code"`
	Message string   `json:"message"`
	Error   []string `json:"error"`
}

type NoteCreateRequest

type NoteCreateRequest struct {
	Id    string `json:"id"`
	Title string `json:"title" validate:"required"`
	Tags  string `json:"tags"`
	Note  string `json:"note"`
	Email string `json:"email"`
}

type NoteCreateResponse

type NoteCreateResponse struct {
	Id string `json:"id"`
}

type NoteRequest

type NoteRequest struct {
	Id string `json:"id" validate:"required"`
}

type NoteRes

type NoteRes struct {
	Notes []NotesResponse
}

optional

func (*NoteRes) AddNote

func (myNote *NoteRes) AddNote(notes NotesResponse) []NotesResponse

type NoteUpdateRequest

type NoteUpdateRequest struct {
	Title string `json:"title" validate:"required"`
	Tags  string `json:"tags"`
	Note  string `json:"note"`
}

type NoteUpdateResponse

type NoteUpdateResponse struct {
	Id        string    `json:"id"`
	Title     string    `json:"title"`
	Tags      string    `json:"tags"`
	Note      string    `json:"note"`
	UpdatedAt time.Time `json:"updated_ad"`
}

type NotesResponse

type NotesResponse struct {
	Id        string    `json:"id"`
	Tittle    string    `json:"title"`
	Tags      string    `json:"tags"`
	Note      string    `json:"note"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type ProfileRequest

type ProfileRequest struct {
	Name        string `json:"name" validate:"required"`
	OldPassword string `json:"old_password"`
	Password    string `json:"password" validate:"required,min=6"`
}

type ProfileResponse

type ProfileResponse struct {
	Email     string    `json:"email"`
	Name      string    `json:"name"`
	Notes     int       `json:"notes"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type RefreshToken

type RefreshToken struct {
	Email         string `json:"email" validate:"email"`
	Refresh_Token string `json:"refresh_token" validate:"jwt"`
}

type RefreshTokenClaims

type RefreshTokenClaims struct {
	jwt.RegisteredClaims
}

type SuccessResponse

type SuccessResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

type TokenClaims

type TokenClaims struct {
	Email string `json:"email"`
	jwt.RegisteredClaims
}

type UserCreateRequest

type UserCreateRequest struct {
	Email    string `json:"email" validate:"required,email"`
	Name     string `json:"name" validate:"required,min=4"`
	Password string `json:"password" validate:"required,min=6"`
}

type UserCreateResponse

type UserCreateResponse struct {
	Email     string    `json:"email"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"creted_at"`
	UpdatedAt time.Time `json:"update_at"`
}

type UserForgetRequest

type UserForgetRequest struct {
	Email string `json:"email" validate:"required,email"`
}

type UserLoginRequest

type UserLoginRequest struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

type UserLoginResponse

type UserLoginResponse struct {
	Token        string `json:"token"`
	RefreshToken string `json:"refresh_token"`
}

type UserRenewPassword

type UserRenewPassword struct {
	Password string `json:"password" validate:"required,min=6"`
}

Jump to

Keyboard shortcuts

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