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

apitest

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package apitest builds the API server for the tests of other packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(deps api.Dependencies) *gin.Engine

NewServer builds the server from deps as api.NewServer does, after filling in the dependencies every server requires that deps leaves out: a logger that discards, an authenticator that refuses every token and credential, and a login rate limiter. A test sets the ones it exercises itself. It panics when deps still misses a dependency a feature it turns on needs.

func WithDefaults

func WithDefaults(deps api.Dependencies) api.Dependencies

WithDefaults returns deps with the defaults NewServer fills in.

Types

This section is empty.

Jump to

Keyboard shortcuts

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