Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v0.1.42 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 63 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(nbrew *notebrew.Notebrew) (*http.Server, error)

func Notebrew

func Notebrew(configDir, dataDir string, csp map[string]string) (*notebrew.Notebrew, []io.Closer, error)

Types

type CaptchaConfig

type CaptchaConfig struct {
	WidgetScriptSrc   string            `json:"widgetScriptSrc"`
	WidgetClass       string            `json:"widgetClass"`
	VerificationURL   string            `json:"verificationURL"`
	ResponseTokenName string            `json:"responseTokenName"`
	SiteKey           string            `json:"siteKey"`
	SecretKey         string            `json:"secretKey"`
	CSP               map[string]string `json:"csp"`
}

type ConfigCmd

type ConfigCmd struct {
	ConfigDir string
	Stdout    io.Writer
	Stderr    io.Writer
	Key       sql.NullString
	Value     sql.NullString
}

func ConfigCommand

func ConfigCommand(configDir string, args ...string) (*ConfigCmd, error)

func (*ConfigCmd) Run

func (cmd *ConfigCmd) Run() error

type CreateinviteCmd

type CreateinviteCmd struct {
	Notebrew     *notebrew.Notebrew
	Stdout       io.Writer
	Email        sql.NullString
	SiteLimit    sql.NullInt64
	StorageLimit sql.NullInt64
	UserFlags    sql.NullString
}

func CreateinviteCommand

func CreateinviteCommand(nbrew *notebrew.Notebrew, args ...string) (*CreateinviteCmd, error)

func (*CreateinviteCmd) Run

func (cmd *CreateinviteCmd) Run() error

type CreatesiteCmd

type CreatesiteCmd struct {
	Notebrew        *notebrew.Notebrew
	Stdout          io.Writer
	SiteName        string
	SiteTitle       string
	SiteTagline     string
	SiteDescription string
}

func CreatesiteCommand

func CreatesiteCommand(nbrew *notebrew.Notebrew, args ...string) (*CreatesiteCmd, error)

func (*CreatesiteCmd) Run

func (cmd *CreatesiteCmd) Run() error

type CreateuserCmd

type CreateuserCmd struct {
	Notebrew     *notebrew.Notebrew
	Stdout       io.Writer
	Username     string
	Email        string
	PasswordHash string
	SiteLimit    sql.NullInt64
	StorageLimit sql.NullInt64
	UserFlags    sql.NullString
}

func CreateuserCommand

func CreateuserCommand(nbrew *notebrew.Notebrew, args ...string) (*CreateuserCmd, error)

func (*CreateuserCmd) Run

func (cmd *CreateuserCmd) Run() error

type DNSConfig

type DNSConfig struct {
	Provider  string `json:"provider"`
	Username  string `json:"username"`
	APIKey    string `json:"apiKey"`
	APIToken  string `json:"apiToken"`
	SecretKey string `json:"secretKey"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Dialect         string            `json:"dialect"`
	FilePath        string            `json:"filePath"`
	User            string            `json:"user"`
	Password        string            `json:"password"`
	Host            string            `json:"host"`
	Port            string            `json:"port"`
	DBName          string            `json:"dbName"`
	Params          map[string]string `json:"params"`
	MaxOpenConns    int               `json:"maxOpenConns"`
	MaxIdleConns    int               `json:"maxIdleConns"`
	ConnMaxLifetime string            `json:"connMaxLifetime"`
	ConnMaxIdleTime string            `json:"connMaxIdleTime"`
}

type DeleteinviteCmd

type DeleteinviteCmd struct {
	Notebrew *notebrew.Notebrew
	Stdout   io.Writer
	Before   sql.NullTime
	After    sql.NullTime
}

func DeleteinviteCommand

func DeleteinviteCommand(nbrew *notebrew.Notebrew, args ...string) (*DeleteinviteCmd, error)

func (*DeleteinviteCmd) Run

func (cmd *DeleteinviteCmd) Run() error

type DeletesiteCmd

type DeletesiteCmd struct {
	Notebrew *notebrew.Notebrew
	Stdout   io.Writer
	SiteName string
}

func DeletesiteCommand

func DeletesiteCommand(nbrew *notebrew.Notebrew, args ...string) (*DeletesiteCmd, error)

func (*DeletesiteCmd) Run

func (cmd *DeletesiteCmd) Run() error

type DeleteuserCmd

type DeleteuserCmd struct {
	Notebrew *notebrew.Notebrew
	Stdout   io.Writer
	Username string
}

func DeleteuserCommand

func DeleteuserCommand(nbrew *notebrew.Notebrew, args ...string) (*DeleteuserCmd, error)

func (*DeleteuserCmd) Run

func (cmd *DeleteuserCmd) Run() error

type ErrorlogConfig added in v0.0.21

type ErrorlogConfig struct {
	Email string `json:"email"`
}

type FSConfig

type FSConfig struct {
	Provider             string            `json:"provider"`
	AuthenticationMethod string            `json:"authenticationMethod"`
	TempDir              string            `json:"tempDir"`
	Dialect              string            `json:"dialect"`
	FilePath             string            `json:"filePath"`
	User                 string            `json:"user"`
	Password             string            `json:"password"`
	Host                 string            `json:"host"`
	Port                 string            `json:"port"`
	DBName               string            `json:"dbName"`
	Params               map[string]string `json:"params"`
	MaxOpenConns         int               `json:"maxOpenConns"`
	MaxIdleConns         int               `json:"maxIdleConns"`
	ConnMaxLifetime      string            `json:"connMaxLifetime"`
	ConnMaxIdleTime      string            `json:"connMaxIdleTime"`
}

func (FSConfig) IsZero

func (c FSConfig) IsZero() bool

type FilesConfig

type FilesConfig struct {
	FSConfig
	Followers              []FSConfig `json:"followers"`
	SynchronousReplication bool       `json:"synchronousReplication"`
}

type HashpasswordCmd

type HashpasswordCmd struct {
	Password []byte
	Stdout   io.Writer
}

func HashpasswordCommand

func HashpasswordCommand(args ...string) (*HashpasswordCmd, error)

func (*HashpasswordCmd) Run

func (cmd *HashpasswordCmd) Run() error

type LogFilter

type LogFilter struct {
	Stderr io.Writer
}

func (*LogFilter) Write

func (logFilter *LogFilter) Write(p []byte) (n int, err error)

type ObjectsConfig

type ObjectsConfig struct {
	Provider        string `json:"provider"`
	FilePath        string `json:"filePath"`
	Endpoint        string `json:"endpoint"`
	Region          string `json:"region"`
	Bucket          string `json:"bucket"`
	AccessKeyID     string `json:"accessKeyID"`
	SecretAccessKey string `json:"secretAccessKey"`
}

type PermissionsCmd

type PermissionsCmd struct {
	Notebrew *notebrew.Notebrew
	Stdout   io.Writer
	Username sql.NullString
	SiteName sql.NullString
	Grant    bool
	Revoke   bool
	SetOwner bool
	ShowID   bool
}

func PermissionsCommand

func PermissionsCommand(nbrew *notebrew.Notebrew, args ...string) (*PermissionsCmd, error)

func (*PermissionsCmd) Run

func (cmd *PermissionsCmd) Run() error

type ProxyConfig

type ProxyConfig struct {
	RealIPHeaders map[string]string `json:"realIPHeaders"`
	ProxyIPs      []string          `json:"proxyIPs"`
}

type ResetpasswordCmd

type ResetpasswordCmd struct {
	Notebrew     *notebrew.Notebrew
	Stdout       io.Writer
	User         string
	PasswordHash string
	ResetLink    bool
}

func ResetpasswordCommand

func ResetpasswordCommand(nbrew *notebrew.Notebrew, args ...string) (*ResetpasswordCmd, error)

func (*ResetpasswordCmd) Run

func (cmd *ResetpasswordCmd) Run() error

type SMTPConfig

type SMTPConfig struct {
	Username      string `json:"username"`
	Password      string `json:"password"`
	Host          string `json:"host"`
	Port          string `json:"port"`
	MailFrom      string `json:"mailFrom"`
	ReplyTo       string `json:"replyTo"`
	LimitInterval string `json:"limitInterval"`
	LimitBurst    int    `json:"limitBurst"`
}

type StartCmd

type StartCmd struct {
	Notebrew  *notebrew.Notebrew
	Stdout    io.Writer
	ConfigDir string
	Handler   http.Handler
}

func StartCommand

func StartCommand(nbrew *notebrew.Notebrew, configDir string, args ...string) (*StartCmd, error)

func (*StartCmd) Run

func (cmd *StartCmd) Run() error

type StatusCmd

type StatusCmd struct {
	Notebrew  *notebrew.Notebrew
	Stdout    io.Writer
	ConfigDir string
}

func StatusCommand

func StatusCommand(nbrew *notebrew.Notebrew, configDir string, args ...string) (*StatusCmd, error)

func (*StatusCmd) Run

func (cmd *StatusCmd) Run() error

type StopCmd

type StopCmd struct {
	Notebrew *notebrew.Notebrew
	Stdout   io.Writer
}

func StopCommand

func StopCommand(nbrew *notebrew.Notebrew, configDir string, args ...string) (*StopCmd, error)

func (*StopCmd) Run

func (cmd *StopCmd) Run() error

Jump to

Keyboard shortcuts

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