api

package
v0.0.0-...-63f4637 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdderAdminResources

type AdderAdminResources interface {
	AddResource(value interface{}, config ...*admin.Config) *admin.Resource
}

AdderAdminResources adds resources to the admin

type AdminRegister

type AdminRegister interface {
	RegisterApp(a interface{ ResourcesAdder })
	MountTo(mountTo string, mux *http.ServeMux)
}

AdminRegister is the app register interface

type Config

type Config struct {
	Host    string
	Port    uint
	IsProd  bool
	LogPath string
}

Config is the api configuration struct.

func NewConfig

func NewConfig() *Config

NewConfig returns the configuration object.

func (*Config) GetURL

func (c *Config) GetURL() string

GetURL returns the API URL

type ResourcesAdder

type ResourcesAdder interface {
	AddAdminResources(admin interface{ AdderAdminResources })
}

ResourcesAdder add the app admin resources

type Server

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

Server is the server object

func NewServer

func NewServer(admin AdminRegister, apps ...ResourcesAdder) *Server

NewServer returns a new admin object.

func (*Server) Init

func (s *Server) Init()

Init initializes the server and the admin

func (*Server) Run

func (s *Server) Run()

Run the server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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