forked from go-vela/types
-
Notifications
You must be signed in to change notification settings - Fork 0
/
metadata.go
46 lines (39 loc) · 1.34 KB
/
metadata.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
// Copyright (c) 2022 Target Brands, Inc. All rights reserved.
//
// Use of this source code is governed by the LICENSE file in this repository.
package types
import "time"
type (
// Database is the extra set of database data passed to the compiler.
Database struct {
Driver string `json:"driver"`
Host string `json:"host"`
}
// Queue is the extra set of queue data passed to the compiler.
Queue struct {
Channel string `json:"channel"`
Driver string `json:"driver"`
Host string `json:"host"`
}
// Source is the extra set of source data passed to the compiler.
Source struct {
Driver string `json:"driver"`
Host string `json:"host"`
}
// Vela is the extra set of Vela data passed to the compiler.
Vela struct {
Address string `json:"address"`
WebAddress string `json:"web_address"`
WebOauthCallbackPath string `json:"web_oauth_callback_path"`
AccessTokenDuration time.Duration `json:"access_token_duration"`
RefreshTokenDuration time.Duration `json:"refresh_token_duration"`
}
// Metadata is the extra set of data passed to the compiler for
// converting a yaml configuration to an executable pipeline.
Metadata struct {
Database *Database `json:"database"`
Queue *Queue `json:"queue"`
Source *Source `json:"source"`
Vela *Vela `json:"vela"`
}
)