imprt

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Files  []File `json:"files,omitempty"`
	Status string `json:"status,omitempty"`
}

type File

type File struct {
	Filename    string `json:"filename,omitempty"`
	Size        int64  `json:"size,omitempty"`
	ContentType string `json:"contentType,omitempty"`
}

type Output

type Output struct {
	Filename string      `json:"filename,omitempty"`
	Type     string      `json:"type,omitempty"`
	Value    interface{} `json:"value,omitempty"`
	Error    string      `json:"error,omitempty"`
}

type Outputs

type Outputs []*Output

type Service

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

func NewService

func NewService(files npncore.FileLoader, logger logur.Logger) *Service

func (*Service) Create

func (s *Service) Create(key string, files []File) error

func (*Service) Load

func (s *Service) Load(key string) (*Config, Outputs, error)

func (*Service) LoadFile

func (s *Service) LoadFile(key string, filename string, contentType string) *Output

func (*Service) WriteFile

func (s *Service) WriteFile(key string, filename string, f multipart.File) error

Jump to

Keyboard shortcuts

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