server

package
v0.0.0-...-3297418 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package server is a generated GoMock package.

Index

Constants

View Source
const (
	// URLShortenPath is the path used to perform CRUD ops on urls.
	URLShortenPath = `/url`
	// URLResolvePath is the path used to resolve shortened urls.
	URLResolvePath = `/r`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

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

HTTPServer implements a Server capable of serving HTTP requests.

func NewHTTPServer

func NewHTTPServer(app *fiber.App, svc service.Service, port int, assets http.FileSystem, log logger.Logger) (HTTPServer, error)

NewHTTPServer returns a new instance of an HTTPServer.

func (HTTPServer) Setup

func (srv HTTPServer) Setup(context.Context) error

Setup applies all the server configurations enabling startup.

func (HTTPServer) Shutdown

func (srv HTTPServer) Shutdown(ctx context.Context) error

Shutdown stops the HTTP server.

func (HTTPServer) Start

func (srv HTTPServer) Start(ctx context.Context) error

Start starts the HTTP server.

type MockServer

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

MockServer is a mock of Server interface

func NewMockServer

func NewMockServer(ctrl *gomock.Controller) *MockServer

NewMockServer creates a new mock instance

func (*MockServer) EXPECT

func (m *MockServer) EXPECT() *MockServerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockServer) Setup

func (m *MockServer) Setup(arg0 context.Context) error

Setup mocks base method

func (*MockServer) Shutdown

func (m *MockServer) Shutdown(arg0 context.Context) error

Shutdown mocks base method

func (*MockServer) Start

func (m *MockServer) Start(arg0 context.Context) error

Start mocks base method

type MockServerMockRecorder

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

MockServerMockRecorder is the mock recorder for MockServer

func (*MockServerMockRecorder) Setup

func (mr *MockServerMockRecorder) Setup(arg0 interface{}) *gomock.Call

Setup indicates an expected call of Setup

func (*MockServerMockRecorder) Shutdown

func (mr *MockServerMockRecorder) Shutdown(arg0 interface{}) *gomock.Call

Shutdown indicates an expected call of Shutdown

func (*MockServerMockRecorder) Start

func (mr *MockServerMockRecorder) Start(arg0 interface{}) *gomock.Call

Start indicates an expected call of Start

type Server

type Server interface {
	Start(context.Context) error
	Shutdown(context.Context) error
	Setup(context.Context) error
}

Server defines the behaviour of a component capable of serving requests.

Jump to

Keyboard shortcuts

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