api

package
v0.0.0-...-1791fcb Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ok = struct {
	Code Code `json:"code"`
}{
	Code: errOK,
}

Functions

func WriteFile

func WriteFile(filename string, list []string, perm os.FileMode) error

Types

type API

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

func NewAPI

func NewAPI(app App) (*API, error)

func (*API) GraphExport

func (a *API) GraphExport(ctx *gin.Context)

func (*API) GraphQuery

func (a *API) GraphQuery(ctx *gin.Context)

func (*API) Start

func (a *API) Start(ctx context.Context) error

func (*API) Stop

func (a *API) Stop(ctx context.Context) error

type App

type App interface {
	Config() config.Config
	Log() *logrus.Logger
	Storage() storage.Storage
	Service() service.IService
}

type Code

type Code struct {
	Code    int64  `json:"code"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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