Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct { // ServiceName is the name of the GH Gantt server used in the AuthToken Issuer and Audience field ServiceName string `required:"true" envconfig:"service_name"` // SigningSecret is used to sign JWTs SigningSecret string `required:"true" envconfig:"signing_secret"` // GHStateSigningPrivKey is the ed25519 key used to sign the state field in a GH authentication request. // Not in the normal OpenSSH key format. Instead the first 32 bits are the private key and the last 32 bits are the // public key. GHStateSigningKey string `validate:"len=64" required:"true" envconfig:"gh_state_signing_key"` }
AuthConfig holds user authentication configuration
func (AuthConfig) GetGHStateSigningPrivKey ¶
func (c AuthConfig) GetGHStateSigningPrivKey() []byte
GetGHStateSigningPrivKey extracts the private key from the GHStateSigningKey field. In the Go ed25519 library the private key and public key are considered the "private key". So this method simply coverts the entire field to bytes.
func (AuthConfig) GetGHStateSigningPubKey ¶
func (c AuthConfig) GetGHStateSigningPubKey() []byte
GetGHStateSigningPubKey extracts the public key from the GHStateSigningKey field
type Config ¶
type Config struct { // HTTPConfig holds HTTP related application configuration HTTPConfig // GitHubConfig holds GitHub related application configuration GitHubConfig // AuthConfig holds user authentication related application configuration AuthConfig }
Config holds application configuration
type GitHubConfig ¶
type GitHubConfig struct { // GitHubClientID is the server's GitHub application's client ID // Set via the APP_GITHUB_CLIENT_ID environment variable GitHubClientID string `required:"true" envconfig:"github_client_id"` // GitHubClientSecret is the server's GitHub application's client secret // Set via the APP_GITHUB_CLIENT_SECRET environment variable GitHubClientSecret string `required:"true" envconfig:"github_client_secret"` }
GitHubConfig holds GitHub related application configuration
type HTTPConfig ¶
type HTTPConfig struct { // Port to listen for HTTP requests on // Set by APP_PORT environment variable Port int `required:"true"` }
HTTPConfig holds HTTP related application configuration
Click to show internal directories.
Click to hide internal directories.