api

package
Version: v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Token string
}

Options is server options

type Resource

type Resource struct {
	DB db.DB
	Zh zh.DB
}

Resource is a struct for reuse and cleanup.

func Prepare

func Prepare() Resource

Prepare initializes Resource for reuse and cleanup.

func (Resource) Cleanup

func (res Resource) Cleanup()

Cleanup cleans up Resource.

func (Resource) Register

func (res Resource) Register(r *gin.Engine, opts *Options)

Register registers API paths to Gin Engine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL