store

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Path string `cfg:"path"`
}

func (File) Store

func (f File) Store(sessionKey []byte, opts sessions.Options) *sessions.FilesystemStore

type Redis

type Redis struct {
	Address  string    `cfg:"address"`
	Username string    `cfg:"username"`
	Password string    `cfg:"password"`
	TLS      TLSConfig `cfg:"tls"`

	KeyPrefix string `cfg:"key_prefix"`
}

func (Redis) Store

func (r Redis) Store(ctx context.Context, opts sessions.Options) (*redisstore.RedisStore, error)

type TLSConfig

type TLSConfig struct {
	// Enabled is whether TLS is enabled.
	Enabled bool `cfg:"enabled"`
	// CertFile is the path to the client's TLS certificate.
	// Should be use with KeyFile.
	CertFile string `cfg:"cert_file"`
	// KeyFile is the path to the client's TLS key.
	// Should be use with CertFile.
	KeyFile string `cfg:"key_file"`
	// CAFile is the path to the CA certificate.
	// If empty, the server's root CA set will be used.
	CAFile string `cfg:"ca_file"`
}

TLSConfig contains options for TLS authentication.

func (TLSConfig) Generate

func (t TLSConfig) Generate() (*tls.Config, error)

Generate returns a tls.Config based on the TLSConfig.

If the TLSConfig is empty, nil is returned.

Jump to

Keyboard shortcuts

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