api

package
v0.0.0-...-0ffacd7 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API type

func New

func New(msgCtrl MessageController) *API

New creates a new instance of API type

func (*API) Run

func (api *API) Run()

Run function runs our API application

type Ctx

type Ctx interface {
	Param(key string) string

	String(code int, format string, values ...interface{})
	JSON(code int, obj interface{})
}

Ctx interface is an abstraction of gin.Context. This interface makes mocking on unit testing easier

type MessageController

type MessageController interface {
	Get(c Ctx)
}

func NewMessageController

func NewMessageController(srv message.Service) MessageController

NewMessageController creates a new instance of messageCtrl

Jump to

Keyboard shortcuts

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