server

package
v0.0.0-...-61905c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2023 License: GPL-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSuspended = errors.New("waiting user authorization")
View Source
var OAuth2Scopes map[string]OAuth2Scope = getOAuth2Scopes()

Functions

func Start

func Start(opts ...Option) (srvErr <-chan error, oauthSrvErr <-chan error)

Types

type Config

type Config struct {
	Key      string
	KeyBytes []byte

	// Address to listen on
	Address    string
	DBHost     string
	DBPort     int
	DBName     string
	DBUsername string
	DBPassword string

	RedisAddress  string
	RedisUsername string
	RedisPassword string

	LogRequest bool
	// contains filtered or unexported fields
}

Config is configuration for the http server to be able to run.

func ParseViper

func ParseViper(v *viper.Viper) *Config

ParseViper extract configuration from v and returns *Config.

func (*Config) Apply

func (c *Config) Apply(conf *Config) error

type OAuth2Scope

type OAuth2Scope string
const (
	ScopeEmail OAuth2Scope = "email"
)

type Option

type Option interface {
	Apply(*Config) error
}

Option gorm option interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL