Skip to content

Commit dedeb10

Browse files
Feature: add header api key to datasource config
1 parent afe04ea commit dedeb10

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

config/credentials.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@ package config
22

33
// Credentials -
44
type Credentials struct {
5-
User *UserCredentials `yaml:"user,omitempty" validate:"omitempty"`
5+
User *UserCredentials `yaml:"user,omitempty" validate:"omitempty"`
6+
ApiKey *ApiKey `yaml:"api_key,omitempty" validate:"omitempty"`
67
}
78

89
// UserCredentials -
910
type UserCredentials struct {
1011
Name string `yaml:"name" validate:"required"`
1112
Password string `yaml:"password" validate:"required"`
1213
}
14+
15+
type ApiKey struct {
16+
Header string `yaml:"header" validate:"required"`
17+
Key string `yaml:"key" validate:"required"`
18+
}

0 commit comments

Comments
 (0)