servicebase

package module
v0.0.0-...-2ce1d6d Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "(untracked)"

Version of OptiSpace.

Functions

This section is empty.

Types

type Config

type Config struct {
	// optional default values for the console flags
	DefaultDev           bool
	DefaultDataDir       string
	DefaultEncryptionEnv string

	// hide the default console server info on app startup
	HideStartBanner bool

	// optional DB configurations
	DataMaxOpenConns int
	DataMaxIdleConns int
	LogsMaxOpenConns int
	LogsMaxIdleConns int
}

Config is the OptiSpace initialization config struct.

type OptiSpace

type OptiSpace struct {

	// RootCmd is the main console command.
	RootCmd *cobra.Command
	// contains filtered or unexported fields
}

OptiSpace defines a OptiSpace app launcher.

It implements core.App via embedding and all of the app interface methods could be accessed directly through the instance.

func New

func New() *OptiSpace

New creates a new OptiSpace instance with the default configuration.

func NewWithConfig

func NewWithConfig(config Config) *OptiSpace

NewWithConfig creates a new OptiSpace instance with the provided config.

func (*OptiSpace) Execute

func (pb *OptiSpace) Execute() error

Execute initializes the application (if not already) and executes the root command with graceful shutdown support.

func (*OptiSpace) ShowStartBanner

func (pb *OptiSpace) ShowStartBanner() bool

ShowStartBanner reports whether the default server start banner should be shown.

func (*OptiSpace) Start

func (pb *OptiSpace) Start() error

Start executes the root command.

Command registration is intentionally owned by cmd/appinit.

Directories

Path Synopsis
cmd
servicebase command
Package core is the backbone of PocketBase.
Package core is the backbone of PocketBase.
Package daos handles common PocketBase DB model manipulations.
Package daos handles common PocketBase DB model manipulations.
services
backup/apis
Package apis owns the HTTP endpoints for the backup service.
Package apis owns the HTTP endpoints for the backup service.
backup/migrations
Package migrations contains backup-owned schema migrations.
Package migrations contains backup-owned schema migrations.
base/forms
Package models implements various services used for request data validation and applying changes to existing DB models through the app Dao.
Package models implements various services used for request data validation and applying changes to existing DB models through the app Dao.
base/models
Package models implements all PocketBase DB models and DTOs.
Package models implements all PocketBase DB models and DTOs.
collection/models
package models implements custom Schema and SchemaField datatypes for handling the Collection schema definitions.
package models implements custom Schema and SchemaField datatypes for handling the Collection schema definitions.
cron/migrations
Package migrations owns cron service storage migrations.
Package migrations owns cron service storage migrations.
file/apis
Package apis owns file service HTTP bindings.
Package apis owns file service HTTP bindings.
file/forms
Package forms contains file request and submit-flow DTOs.
Package forms contains file request and submit-flow DTOs.
file/migrations
Package migrations owns the file service schema.
Package migrations owns the file service schema.
file/queries
Package queries contains file read-side query helpers.
Package queries contains file read-side query helpers.
health/migrations
Package migrations registers health-owned database migrations.
Package migrations registers health-owned database migrations.
log
log/forms
Package forms contains log service request and submit forms.
Package forms contains log service request and submit forms.
log/queries
Package queries contains read-side query helpers for the log service.
Package queries contains read-side query helpers for the log service.
mails
Package mails implements various helper methods for sending user and admin emails like forgotten password, verification, etc.
Package mails implements various helper methods for sending user and admin emails like forgotten password, verification, etc.
migrate
Package migrate provides migration command orchestration, migration file generation and collection automigration hooks.
Package migrate provides migration command orchestration, migration file generation and collection automigration hooks.
migrate/apis
Package apis is reserved for migrate service HTTP bindings.
Package apis is reserved for migrate service HTTP bindings.
migrate/forms
Package forms contains migrate command/request forms when migrate flows need validation-oriented DTOs.
Package forms contains migrate command/request forms when migrate flows need validation-oriented DTOs.
migrate/migrations
Package migrations is intentionally empty for the migrate tooling service.
Package migrations is intentionally empty for the migrate tooling service.
migrate/queries
Package queries contains migrate service read-side helpers.
Package queries contains migrate service read-side helpers.
realtime/migrations
Package migrations owns realtime service storage migrations.
Package migrations owns realtime service storage migrations.
realtime/queries
Package queries contains realtime read-side query helpers.
Package queries contains realtime read-side query helpers.
record/apis
Package apis contains the record service HTTP transport binding layer.
Package apis contains the record service HTTP transport binding layer.
team/apis
Package apis contains the team service HTTP transport binding layer.
Package apis contains the team service HTTP transport binding layer.
team/forms
Package forms reserves the service-local form layer for the team service.
Package forms reserves the service-local form layer for the team service.
updater/forms
Package forms contains updater service request/submit forms.
Package forms contains updater service request/submit forms.
updater/queries
Package queries contains read-side helpers for the updater service.
Package queries contains read-side helpers for the updater service.
user/apis
Package apis contains the user service HTTP transport binding layer.
Package apis contains the user service HTTP transport binding layer.
Package tests provides common helpers and mocks used in PocketBase application tests.
Package tests provides common helpers and mocks used in PocketBase application tests.
tools
cron
Package cron implements a crontab-like service to execute and schedule repeative tasks/jobs.
Package cron implements a crontab-like service to execute and schedule repeative tasks/jobs.
resolvers
Package resolvers contains custom search.FieldResolver implementations.
Package resolvers contains custom search.FieldResolver implementations.
template
Package template is a thin wrapper around the standard html/template and text/template packages that implements a convenient registry to load and cache templates on the fly concurrently.
Package template is a thin wrapper around the standard html/template and text/template packages that implements a convenient registry to load and cache templates on the fly concurrently.
tokenizer
Package tokenizer implements a rudimentary tokens parser of buffered io.Reader while respecting quotes and parenthesis boundaries.
Package tokenizer implements a rudimentary tokens parser of buffered io.Reader while respecting quotes and parenthesis boundaries.
tokens
Package tokens implements various record tokens generation methods.
Package tokens implements various record tokens generation methods.
types
Package types implements some commonly used db serializable types like datetime, json, etc.
Package types implements some commonly used db serializable types like datetime, json, etc.
validators
Package validators implements custom shared PocketBase validators.
Package validators implements custom shared PocketBase validators.

Jump to

Keyboard shortcuts

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