base

package
v0.0.0-...-f3acd81 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cron

func Cron(interval time.Duration, function func()) (stop context.CancelFunc)

Cron exécute function régulièrement, avec l'interval fourni. Il retourne une fonction stop().

func IsBatchID

func IsBatchID(batchID string) bool

IsBatchID retourne `true` si `batchID` est un identifiant de Batch.

Types

type AdminBatch

type AdminBatch struct {
	ID            AdminID          `json:"id" bson:"_id"`
	Files         BatchFiles       `json:"files" bson:"files"`
	Name          string           `json:"name" bson:"name"`
	Readonly      bool             `json:"readonly" bson:"readonly"`
	CompleteTypes []string         `json:"complete_types" bson:"complete_types"`
	Params        adminBatchParams `json:"params" bson:"param"`
}

AdminBatch metadata Batch

func MockBatch

func MockBatch(filetype string, filepaths []string) AdminBatch

MockBatch with a map[type][]filepaths

type AdminID

type AdminID struct {
	Key  string `json:"key" bson:"key"`
	Type string `json:"type" bson:"type"`
}

AdminID Collection key

type BatchFile

type BatchFile string

BatchFile encapsule un fichier mentionné dans un Batch

func (BatchFile) FilePath

func (file BatchFile) FilePath() string

FilePath retourne le chemin vers le fichier, sans préfixe

func (BatchFile) IsCompressed

func (file BatchFile) IsCompressed() bool

IsCompressed est vrai si le fichier est compressé

func (BatchFile) Prefix

func (file BatchFile) Prefix() string

Prefix retourne le préfixe éventuellement présent devant le nom de fichier

type BatchFiles

type BatchFiles map[string][]BatchFile

BatchFiles fichiers mappés par type

Jump to

Keyboard shortcuts

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