-
Notifications
You must be signed in to change notification settings - Fork 20
/
registry.go
51 lines (46 loc) · 1.48 KB
/
registry.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
// Copyright (c) 2022 Silverton Data, Inc.
// You may use, distribute, and modify this code under the terms of the Apache-2.0 license, a copy of
// which may be found at https://github.com/silverton-io/buz/blob/main/LICENSE
package config
type Http struct {
Enabled bool `json:"enabled"`
}
type Purge struct {
Enabled bool `json:"enabled"`
}
type Backend struct {
Type string `json:"type"`
Path string `json:"path"`
// S3 and Gcs
Bucket string `json:"bucket,omitempty"`
// Gcs
Region string `json:"region,omitempty"`
// Http
Host string `json:"host,omitempty"`
// Db, general
RegistryTable string `json:"registryTable,omitempty"`
// Postgres Database
DbHost string `json:"-"`
DbPort uint16 `json:"-"`
DbName string `json:"-"`
DbUser string `json:"-"`
DbPass string `json:"-"`
// Mongodb
MongoHosts []string `json:"mongoHosts,omitempty"`
MongoPort string `json:"mongoDbPort,omitempty"`
MongoDbName string `json:"mongoDbName,omitempty"`
MongoUser string `json:"-"`
MongoPass string `json:"-"`
RegistryCollection string `json:"registryCollection,omitempty"`
// Minio
MinioEndpoint string `json:"minioEndpoint,omitempty"`
AccessKeyId string `json:"accessKeyId,omitempty"`
SecretAccessKey string `json:"secretAccessKey,omitempty"`
}
type Registry struct {
Backend `json:"backend"`
TtlSeconds int `json:"ttlSeconds"`
MaxSizeBytes int `json:"maxSizeBytes"`
Purge `json:"purge"`
Http `json:"http"`
}