-
Notifications
You must be signed in to change notification settings - Fork 0
/
website.go
53 lines (42 loc) · 1.22 KB
/
website.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package structureSpec
import (
"github.com/taubyte/go-specs/common"
websiteSpec "github.com/taubyte/go-specs/website"
)
type Website struct {
Id string
Name string
Description string
Tags []string
Domains []string
Paths []string
Branch string
Provider string
RepoID string `mapstructure:"repository-id"`
RepoName string `mapstructure:"repository-name"`
// noset, this is parsed from the tags
SmartOps []string
Basic
Wasm
}
func (w Website) GetName() string {
return w.Name
}
func (w *Website) SetId(id string) {
w.Id = id
}
func (w *Website) BasicPath(branch, commit, projectId, appId string) (*common.TnsPath, error) {
return websiteSpec.Tns().BasicPath(branch, commit, projectId, appId, w.Id)
}
func (w *Website) IndexValue(branch, projectId, appId string) (*common.TnsPath, error) {
return websiteSpec.Tns().IndexValue(branch, projectId, appId, w.Id)
}
func (w *Website) HttpPath(fqdn string) (*common.TnsPath, error) {
return websiteSpec.Tns().HttpPath(fqdn)
}
func (w *Website) WasmModulePath(projectId, appId string) (*common.TnsPath, error) {
return websiteSpec.Tns().WasmModulePath(projectId, appId, w.Name)
}
func (w *Website) GetId() string {
return w.Id
}