Skip to content

Commit 2b09c5a

Browse files
Merge pull request #36 from dipdup-io/feature/api-key-in-config
Feature: add header api key to datasource config
2 parents afe04ea + dedeb10 commit 2b09c5a

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)