-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathsla.go
More file actions
35 lines (29 loc) · 791 Bytes
/
sla.go
File metadata and controls
35 lines (29 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2017 Canonical Ltd.
// Licensed under the LGPLv3, see LICENCE file for details.
package description
// SLA represents the sla for the model.
type SLA interface {
// Level returns the level of the sla.
Level() string
// Owner returns the owner of the sla.
Owner() string
// Credentials returns the credentials of the sla.
Credentials() string
}
type sla struct {
Level_ string `yaml:"level"`
Owner_ string `yaml:"owner"`
Credentials_ string `yaml:"credentials"`
}
// Level returns the level of the sla.
func (s sla) Level() string {
return s.Level_
}
// Owner returns the owner of the sla.
func (s sla) Owner() string {
return s.Owner_
}
// Credentials returns the Credentials of the sla.
func (s sla) Credentials() string {
return s.Credentials_
}