api

package
v0.0.0-...-be1fadd Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticatedMiddleware

func AuthenticatedMiddleware() gin.HandlerFunc

Types

type Account

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

type AccountRequest

type AccountRequest struct {
	Currency string `json:"currency" binding:"required,currency"`
}

type Auth

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

type Server

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

func NewServer

func NewServer(envPath string) *Server

func (*Server) Start

func (s *Server) Start(port int)

type TransferRequest

type TransferRequest struct {
	ToAccountID   int32   `json:"to_account_id" binding:"required"`
	Amount        float64 `json:"amount" binding:"required"`
	FromAccountID int32   `json:"from_account_id" binding:"required"`
}

type UpdateUsernameType

type UpdateUsernameType struct {
	Username string `json:"username" binding:"required"`
}

type User

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

type UserParams

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

type UserResponse

type UserResponse struct {
	ID        int64     `json:"id"`
	Email     string    `json:"email"`
	UserName  string    `json:"username"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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