bootstrap

package
v0.0.0-a39cc9e Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, runCfg RunConfig) error

The Run function initializes and starts a service with configuration and logging, and handles cleanup upon exit.

Types

type CaptchaRedisStore

type CaptchaRedisStore struct {
	// contains filtered or unexported fields
}

CaptchaRedisStore implements captcha.Store interface using redis v9 client

func NewCaptchaRedisStore

func NewCaptchaRedisStore(cli *redis.Client, expiration time.Duration, prefix string) *CaptchaRedisStore

NewCaptchaRedisStore creates a new CaptchaRedisStore instance

func (*CaptchaRedisStore) Get

func (s *CaptchaRedisStore) Get(id string, clear bool) []byte

Get retrieves the captcha digits from redis and optionally deletes it

func (*CaptchaRedisStore) Set

func (s *CaptchaRedisStore) Set(id string, digits []byte)

Set stores the captcha id and digits in redis

type RunConfig

type RunConfig struct {
	WorkDir   string // Working directory
	Configs   string // Directory or files (multiple separated by commas)
	StaticDir string // Static files directory
}

RunConfig defines the config for run command.

Jump to

Keyboard shortcuts

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