api

package
v0.0.0-...-1b73f85 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(tokenMaker token.Maker) gin.HandlerFunc

func NewUserResponse

func NewUserResponse(user db.User) userResponse

Types

type Server

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

func NewServer

func NewServer(config util.Config, store *db.Store) (*Server, error)

func (*Server) CheckHealth

func (server *Server) CheckHealth(ctx *gin.Context)

func (*Server) CheckReadiness

func (server *Server) CheckReadiness(ctx *gin.Context)

func (*Server) CreateAccount

func (server *Server) CreateAccount(ctx *gin.Context)

func (*Server) CreateTransfer

func (server *Server) CreateTransfer(ctx *gin.Context)

func (*Server) Start

func (server *Server) Start(address string) error

func (*Server) ValidAccount

func (server *Server) ValidAccount(ctx *gin.Context, accountID int64, currency string) (db.Account, bool)

Jump to

Keyboard shortcuts

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