Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v1.56.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 32 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMiddlewareType added in v1.53.0

type AuthMiddlewareType = string
const (
	UserAuth  AuthMiddlewareType = "USER"
	AdminAuth AuthMiddlewareType = "ADMIN"
)

type Server

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

Server is the struct that represents the API server

func New

func New(config *config.Config,
	services service.Services,
	zapLog *zap.Logger,
) Server

New is used to create a new instance of the API server

func (*Server) StartWithContext added in v1.48.0

func (s *Server) StartWithContext(ctx context.Context)

func (*Server) Stop

func (s *Server) Stop(ctx context.Context)

Stop shutdown the API server. It waits for StartWithContext to return (servers drained) or for ctx to be done.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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