Skip to content

Commit

Permalink
Merge pull request #36 from dipdup-io/feature/api-key-in-config
Browse files Browse the repository at this point in the history
Feature: add header api key to datasource config
  • Loading branch information
aopoltorzhicky authored Sep 24, 2024
2 parents afe04ea + dedeb10 commit 2b09c5a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@ package config

// Credentials -
type Credentials struct {
User *UserCredentials `yaml:"user,omitempty" validate:"omitempty"`
User *UserCredentials `yaml:"user,omitempty" validate:"omitempty"`
ApiKey *ApiKey `yaml:"api_key,omitempty" validate:"omitempty"`
}

// UserCredentials -
type UserCredentials struct {
Name string `yaml:"name" validate:"required"`
Password string `yaml:"password" validate:"required"`
}

type ApiKey struct {
Header string `yaml:"header" validate:"required"`
Key string `yaml:"key" validate:"required"`
}

0 comments on commit 2b09c5a

Please sign in to comment.