Skip to content

Commit a47937a

Browse files
committed
config: linting errors
1 parent 310bda7 commit a47937a

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

cmd/catalyst/config/config.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ var fullstack []byte
1616
//go:embed full-stack.sql
1717
var sqlTables string
1818

19-
var adminId = "00000000-0000-4000-0000-000000000000"
20-
var recordingBucketId = "00000000-0000-4000-0000-000000000001"
21-
var vodBucketId = "00000000-0000-4000-0000-000000000002"
22-
var vodBucketCatalystId = "00000000-0000-4000-0000-000000000003"
23-
var privateBucketId = "00000000-0000-4000-0000-000000000004"
19+
var adminID = "00000000-0000-4000-0000-000000000000"
20+
var recordingBucketID = "00000000-0000-4000-0000-000000000001"
21+
var vodBucketID = "00000000-0000-4000-0000-000000000002"
22+
var vodBucketCatalystID = "00000000-0000-4000-0000-000000000003"
23+
var privateBucketID = "00000000-0000-4000-0000-000000000004"
2424

2525
type Cli struct {
2626
PublicURL string
@@ -61,7 +61,7 @@ func GenerateConfig(cli *Cli) ([]byte, []byte, error) {
6161
inserts := []DBObject{}
6262

6363
admin := DBObject{
64-
"id": adminId,
64+
"id": adminID,
6565
"firstName": "Root",
6666
"lastName": "User",
6767
"admin": true,
@@ -83,21 +83,21 @@ func GenerateConfig(cli *Cli) ([]byte, []byte, error) {
8383
}
8484
inserts = append(inserts, admin, apiToken)
8585

86-
recordingBucket := ObjectStore(adminId, cli.PublicURL, recordingBucketId, "os-recordings")
86+
recordingBucket := ObjectStore(adminID, cli.PublicURL, recordingBucketID, "os-recordings")
8787

88-
vodBucket := ObjectStore(adminId, cli.PublicURL, vodBucketId, "os-vod")
88+
vodBucket := ObjectStore(adminID, cli.PublicURL, vodBucketID, "os-vod")
8989

90-
vodBucketCatalyst := ObjectStore(adminId, cli.PublicURL, vodBucketCatalystId, "os-catalyst-vod")
90+
vodBucketCatalyst := ObjectStore(adminID, cli.PublicURL, vodBucketCatalystID, "os-catalyst-vod")
9191

92-
privateBucket := ObjectStore(adminId, cli.PublicURL, privateBucketId, "os-vod")
92+
privateBucket := ObjectStore(adminID, cli.PublicURL, privateBucketID, "os-vod")
9393
inserts = append(inserts, recordingBucket, vodBucket, vodBucketCatalyst, privateBucket)
9494

9595
for _, protocol := range conf.Config.Protocols {
9696
if protocol.Connector == "livepeer-api" && !protocol.StreamInfoService {
97-
protocol.RecordCatalystObjectStoreId = recordingBucketId
98-
protocol.VODCatalystObjectStoreId = vodBucketCatalystId
99-
protocol.VODCatalystPrivateAssetsObjectStore = privateBucketId
100-
protocol.VODObjectStoreId = vodBucketId
97+
protocol.RecordCatalystObjectStoreId = recordingBucketID
98+
protocol.VODCatalystObjectStoreId = vodBucketCatalystID
99+
protocol.VODCatalystPrivateAssetsObjectStore = privateBucketID
100+
protocol.VODObjectStoreId = vodBucketID
101101
protocol.CORSJWTAllowlist = fmt.Sprintf(`["%s"]`, cli.PublicURL)
102102
protocol.Ingest = fmt.Sprintf(
103103
`[{"ingest":"rtmp://%s/live","ingests":{"rtmp":"rtmp://%s/live","srt":"srt://%s:8889"},"playback":"%s/mist/hls","base":"%s","origin":"%s"}]`,
@@ -116,8 +116,8 @@ func GenerateConfig(cli *Cli) ([]byte, []byte, error) {
116116
protocol.LivepeerAccessToken = cli.Secret
117117
} else if protocol.Connector == "livepeer-analyzer" {
118118
protocol.LivepeerAccessToken = cli.Secret
119-
} else if protocol.Connector == "livepeer" && protocol.Broadcaster && protocol.MetadataQueueUri != "" {
120-
protocol.AuthWebhookURL = fmt.Sprintf("http://%s:%s@127.0.0.1:3004/api/stream/hook", adminId, cli.Secret)
119+
} else if protocol.Connector == "livepeer" && protocol.Broadcaster && protocol.MetadataQueueURI != "" {
120+
protocol.AuthWebhookURL = fmt.Sprintf("http://%s:%s@127.0.0.1:3004/api/stream/hook", adminID, cli.Secret)
121121
}
122122
}
123123

@@ -155,13 +155,13 @@ func GenerateConfig(cli *Cli) ([]byte, []byte, error) {
155155
return out, []byte(sql), nil
156156
}
157157

158-
func ObjectStore(userId, publicUrl, id, bucket string) DBObject {
158+
func ObjectStore(userID, publicUrl, id, bucket string) DBObject {
159159
return DBObject{
160160
"createdAt": 0,
161161
"id": id,
162162
"publicUrl": fmt.Sprintf("%s/%s", publicUrl, bucket),
163163
"url": fmt.Sprintf("s3+http://admin:password@127.0.0.1:9000/%s", bucket),
164-
"userId": userId,
164+
"userId": userID,
165165
"kind": "object-store",
166166
}
167167
}

cmd/catalyst/config/mist_config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ type Protocol struct {
7878
Ingest string `json:"ingest,omitempty"`
7979
CORSJWTAllowlist string `json:"cors-jwt-allowlist,omitempty"`
8080
LivepeerAccessToken string `json:"livepeer-access-token,omitempty"`
81+
AuthWebhookURL string `json:"authWebhookUrl,omitempty"`
8182

8283
ICEServers []ICEServer `json:"iceservers,omitempty"`
8384
// And finally, four ways to spell the same thing:
8485
AMQPURL string `json:"amqp-url,omitempty"`
8586
AMQPURI string `json:"amqp-uri,omitempty"`
86-
MetadataQueueUri string `json:"metadataQueueUri,omitempty"`
87+
MetadataQueueURI string `json:"metadataQueueUri,omitempty"`
8788
RabbitMQURI string `json:"rabbitmq-uri,omitempty"`
88-
AuthWebhookURL string `json:"authWebhookUrl,omitempty"`
8989
}
9090

9191
type Config struct {

0 commit comments

Comments
 (0)