controller

package
v0.0.0-...-0590b23 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func Register

func Register(config *config.Config) *Controller

func (*Controller) Login

func (c *Controller) Login(ctx context.Context, request *config.Request, reply *config.Response) error

func (*Controller) Profile

func (c *Controller) Profile(ctx context.Context, request *config.Request, reply *config.Response) error

func (*Controller) Register

func (c *Controller) Register(ctx context.Context, request *config.Request, reply *config.Response) error

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type ProfileRequest

type ProfileRequest struct {
	UserId uint `json:"user_id"`
}

type ProfileResponse

type ProfileResponse struct {
	UserId   uint   `json:"user_id"`
	Username string `json:"username"`
}

type RegisterRequest

type RegisterRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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