server

package
v0.0.0-...-144d224 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORS

func CORS(next http.HandlerFunc) http.HandlerFunc

Types

type ApiServer

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

func NewApiServer

func NewApiServer(svc Service) *ApiServer

func (*ApiServer) Start

func (s *ApiServer) Start(listenAddr string) error

type FileType

type FileType string
const (
	Karen     FileType = "karen"
	Plan      FileType = "plan"
	State     FileType = "state"
	Undefined FileType = "undefined"
)

type LoggingService

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

func (*LoggingService) PostParseFile

func (s *LoggingService) PostParseFile(data []byte, ctx context.Context) (parsedFile []byte, err error)

type ParseRequestData

type ParseRequestData struct {
	FileData string   `json:"data"`
	FileType FileType `json:"type"`
	URL      string   `json:"url,omitempty"`
}

type PreprocessorService

type PreprocessorService struct {
}

func (*PreprocessorService) PostParseFile

func (p *PreprocessorService) PostParseFile(data []byte, ctx context.Context) ([]byte, error)

type Service

type Service interface {
	PostParseFile([]byte, context.Context) ([]byte, error)
}

func NewLoggingService

func NewLoggingService(next Service) Service

func NewPreprocessorService

func NewPreprocessorService() Service

Jump to

Keyboard shortcuts

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