api

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package api the api service

Index

Constants

View Source
const (
	// DefaultTimeout the default timeout
	DefaultTimeout = time.Minute
	// DefaultAddress the api default address
	DefaultAddress = "localhost:8080"
)

Variables

This section is empty.

Functions

func Server

func Server(opt Options) *http.Server

Server the api service

Types

type Options

type Options struct {
	Token      string        `yaml:"token"`
	Address    string        `yaml:"address"`
	Timeout    time.Duration `yaml:"timeout"`
	RequestLog bool          `yaml:"request-log"`
}

Options the api server configuration

Directories

Path Synopsis
Package v1 the version 1 api
Package v1 the version 1 api

Jump to

Keyboard shortcuts

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