-
Notifications
You must be signed in to change notification settings - Fork 43
/
function.go
28 lines (23 loc) · 941 Bytes
/
function.go
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
package models
type Function struct {
Name string `yaml:"name,omitempty" json:"name,omitempty" validate:"omitempty,resourceName,nonBaetyl"`
Handler string `yaml:"handler,omitempty" json:"handler,omitempty"`
Version string `yaml:"version,omitempty" json:"version,omitempty"`
Runtime string `yaml:"runtime,omitempty" json:"runtime,omitempty"`
Code FunctionCode `yaml:"code,omitempty" json:"code,omitempty"`
}
type FunctionView struct {
Functions []Function `json:"functions"`
}
type FunctionSourceView struct {
Sources []FunctionSource `json:"sources"`
Runtimes map[string]string `json:"runtimes"`
}
type FunctionSource struct {
Name string `json:"name,omitempty"`
}
type FunctionCode struct {
Size int32 `yaml:"size,omitempty" json:"size,omitempty"`
Sha256 string `yaml:"sha256,omitempty" json:"sha256,omitempty"`
Location string `yaml:"location,omitempty" json:"location,omitempty"`
}