files

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoutes

func AddRoutes(router *mux.Router, config *configuration.Config)

func GCodeToImage

func GCodeToImage(path string)

func GCodeToMap

func GCodeToMap(gcode string) (map[string]string, error)

Types

type FileRepository

type FileRepository struct {
	Files          []PrusaSlicerGcodeMetaData
	DeleteDuration int
	// contains filtered or unexported fields
}

func NewFileRepository

func NewFileRepository(config configuration.Config) *FileRepository

func (*FileRepository) UpdateFiles

func (m *FileRepository) UpdateFiles()

type FilesApiResponse

type FilesApiResponse struct {
	Data  []PrusaSlicerGcodeMetaData `json:"data"`
	Count int                        `json:"count"`
}

type FilesHandler

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

func NewFilesHandler

func NewFilesHandler(config configuration.Config) *FilesHandler

func (*FilesHandler) GetFiles

func (m *FilesHandler) GetFiles(w http.ResponseWriter, r *http.Request)

func (*FilesHandler) PostFiles

func (m *FilesHandler) PostFiles(w http.ResponseWriter, r *http.Request)

type IFileRepository

type IFileRepository interface {
}

type PrusaSlicerGcodeMetaData

type PrusaSlicerGcodeMetaData struct {
	FileName                        string            `json:"filename"`
	Image                           string            `json:"image"`
	FilamentUsedMM                  string            `json:"filamentUsedMM"`
	FilamentUsedCM3                 string            `json:"filamentUsedCM3"`
	FilamentUsedGramm               string            `json:"filamentUsedGramm"`
	FilamentCost                    string            `json:"filamentCost"`
	TotalFilamentUsedGramm          string            `json:"totalFilamentUsedGramm"`
	TotalFilamentCost               string            `json:"totalFilamentCost"`
	EstimatedPrintingTimeNormalMode string            `json:"estimatedPrintingTimeNormalMode"`
	EstimatedPrintingTimeSilentMode string            `json:"estimatedPrintingTimeSilentMode"`
	Options                         map[string]string `json:"options"`
}

Jump to

Keyboard shortcuts

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