aboutsummaryrefslogtreecommitdiff
path: root/state/state.go
blob: d28a7016f6418197bf476bf9d1b4ad871b6df657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package state

import (
	"bareos-zabbix-check/config"
	"bareos-zabbix-check/job"
)

// maxNameLength : the maximum length of a string, hard coded in bareos
const maxNameLength = 128

// State is an object for manipulating a bareos state file
type State struct {
	config *config.Config
	header header
	jobs   []job.Job
}

// Jobs returns the jobs from the state file
func (s *State) Jobs() []job.Job {
	return s.jobs
}