server

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	METADATA_PATH     = "meta"
	METADATA_FILENAME = "meta.yaml"
)

Variables

This section is empty.

Functions

func ASCIITableVisualizer

func ASCIITableVisualizer(w io.Writer, pipeline pipeline.Pipeliner) error

func Failed

func Failed(c *gin.Context, err error)

func Success

func Success(c *gin.Context, data interface{})

Types

type FileType

type FileType string
const (
	FileTypePlugin         FileType = "plugins"
	FileTypePipelineConfig FileType = "pipelines"
)

type Metadata

type Metadata interface {
	AddPath(ft FileType, path string) error
	RemovePath(ft FileType, path string) error
	GetPath(ft FileType, filename string) string
	ExistsPath(ft FileType, path string) bool
	ListPaths(ft FileType) []string
}

func NewMetadata

func NewMetadata(metapath string) (Metadata, error)

type Option

type Option func(*Options)

func HTTPAddr

func HTTPAddr(addr string) Option

func MetadataPath

func MetadataPath(path string) Option

type Options

type Options struct {
	HTTPAddr     string
	MetadataPath string
}

type Receptor

type Receptor struct {
	StructName      string
	StructFieldName string
	InjectName      string
	ReflectType     string
}

type Server

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

func New

func New(opts ...Option) (*Server, error)

func (*Server) Serve

func (c *Server) Serve() error

func (*Server) Stop

func (c *Server) Stop()

Jump to

Keyboard shortcuts

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