base

package
v0.0.0-...-5b7235d Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 3 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        struct {
		DateDebut       time.Time `json:"date_debut" bson:"date_debut"`
		DateFin         time.Time `json:"date_fin" bson:"date_fin"`
		DateFinEffectif time.Time `json:"date_fin_effectif" bson:"date_fin_effectif"`
	} `json:"params" bson:"param"`
}

AdminBatch metadata Batch

func MockBatch

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

MockBatch with a map[type][]filepaths

func (*AdminBatch) New

func (batch *AdminBatch) New(batchKey string) error

New crée un nouveau batch

type AdminID

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

AdminID Collection key

type BatchFiles

type BatchFiles map[string][]string

BatchFiles fichiers mappés par type

Jump to

Keyboard shortcuts

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