Skip to content

Commit

Permalink
Feature: add header api key to datasource config
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Sep 24, 2024
1 parent afe04ea commit dedeb10
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 dedeb10

Please sign in to comment.