server

package
v0.0.0-...-8cde2e0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportDataRepository

type ImportDataRepository interface {
	Import(ctx context.Context, fileName, contentType *string, fileSize *int, data io.Reader) error
}

type ImportDataRouteOptions

type ImportDataRouteOptions struct {
	Enabled  bool
	Bucket   string
	BasePath string
}

type ImportDataService

type ImportDataService service

type Options

type Options struct {
	Prefix               *string
	Routes               *RoutesOptions
	QueryingRepository   QueryingRepository
	ImportDataRepository ImportDataRepository
	StorageRepository    StorageRepository
}

type QueryingRepository

type QueryingRepository interface {
	Execute(ctx context.Context, queryID, formatID *string, value interface{}) ([]byte, error)
}

type QueryingRouteOptions

type QueryingRouteOptions struct {
	Enabled bool
}

type QueryingService

type QueryingService service

type RoutesOptions

type RoutesOptions struct {
	ImportData ImportDataRouteOptions
	Querying   QueryingRouteOptions
}

type Server

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

func New

func New(options *Options) (*Server, error)

func (*Server) Run

func (pkg *Server) Run(addr ...string) error

type StorageRepository

type StorageRepository interface {
	ListConfig(ctx context.Context, processedID *int, offset, limit *int, search *string) ([]*domain.FileConfig, error)
	DeleteConfig(ctx context.Context, id *int) error
	SaveConfig(ctx context.Context, item *domain.FileConfig) (*domain.FileConfig, error)
	ProcessedFileContent(ctx context.Context, id *int, offset, limit *int) ([][]string, error)
	ListProcessedFile(ctx context.Context, parentID *int, offset, limit *int, search *string) ([]*domain.FileInfoResult, error)
	List(ctx context.Context, offset, limit *int, search *string) ([]*domain.FileInfo, error)
}

type StorageService

type StorageService service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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