gbase

package module
v0.0.0-...-c627d9c Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 11 Imported by: 0

README

G-Base

G-base is a powerful and user-friendly database management tool that allows you to easily store, organize, and retrieve your data.

What's new in this fork?

This is a fork of Pocketbase and includes several enhancements to the original version:

  • Spanish IU support.

  • A beloved dark mode with a dark purple color palette.

  • Model validations: We have added model validation checks to ensure that your data is always accurate and consistent.

  • Custom middlewares: We have also added custom middlewares to better adapt Pocketbase to your specific needs. These middlewares allow you to customize the way Pocketbase handles your data and makes it easier to integrate with other systems.

How to use G-Base

Using G-base is easy! Simply install the tool on your computer and start adding your data. You can organize your information using tables and columns, and use powerful search and filtering features to find what you need. G-base also includes a variety of customization options, so you can tailor the interface and functionality to your liking.

Contributing to G-Base

We welcome contributions to G-Base! If you have an idea for a new feature or have found a bug, please open an issue on the GitHub repository. If you would like to contribute code, please create a pull request with a detailed description of your changes.

Future plans

  • I'm currently working on adding support for more database types, like MySQL or PostgreSQL.
  • MQTT broker to integrate IoT devices to take advantage of gbase real-time subscriptions
  • Support for GraphQL is planned in the future.
  • And of course, always looking for ways to improve the user experience and make G-base even more powerful and easy to use.

Security

If you discover a security vulnerability within G-Base, please e-mail me. All reports will be promptly addressed, and you’ll be credited accordingly.

Note

This fork of Pocketbase is being used for a personal project and may not be relevant for all users. If you are not looking to make specific changes or additions to Pocketbase, it is recommended to use the original version. It started as a way to learn Go and avoid possible breaking changes in the original version, but I decided to share it in case it is useful to someone else.

Thanks

Thanks to the Pocketbase team for creating such a great tool! We hope you enjoy using G-Base as much as I do.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "(untracked)"

Version of PocketBase

Functions

This section is empty.

Types

type Config

type Config struct {
	// optional default values for the console flags
	DefaultDebug         bool
	DefaultDataDir       string // if not set, it will fallback to "./pb_data"
	DefaultEncryptionEnv string

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

	// optional DB configurations
	DataMaxOpenConns int // default to core.DefaultDataMaxOpenConns
	DataMaxIdleConns int // default to core.DefaultDataMaxIdleConns
	LogsMaxOpenConns int // default to core.DefaultLogsMaxOpenConns
	LogsMaxIdleConns int // default to core.DefaultLogsMaxIdleConns
}

Config is the PocketBase initialization config struct.

type PocketBase

type PocketBase struct {

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

PocketBase defines a PocketBase app launcher.

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

func New

func New() *PocketBase

New creates a new PocketBase instance with the default configuration. Use [NewWithConfig()] if you want to provide a custom configuration.

Note that the application will not be initialized/bootstrapped yet, aka. DB connections, migrations, app settings, etc. will not be accessible. Everything will be initialized when [Start()] is executed. If you want to initialize the application before calling [Start()], then you'll have to manually call [Bootstrap()].

func NewWithConfig

func NewWithConfig(config *Config) *PocketBase

NewWithConfig creates a new PocketBase instance with the provided config.

Note that the application will not be initialized/bootstrapped yet, aka. DB connections, migrations, app settings, etc. will not be accessible. Everything will be initialized when [Start()] is executed. If you want to initialize the application before calling [Start()], then you'll have to manually call [Bootstrap()].

func (*PocketBase) Execute

func (pb *PocketBase) Execute() error

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

This method differs from pb.Start() by not registering the default system commands!

func (*PocketBase) Start

func (pb *PocketBase) Start() error

Start starts the application, aka. registers the default system commands (serve, migrate, version) and executes pb.RootCmd.

Directories

Path Synopsis
Package apis implements the default PocketBase api services and middlewares.
Package apis implements the default PocketBase api services and middlewares.
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.
examples
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.
validators
Package validators implements custom shared PocketBase validators.
Package validators implements custom shared PocketBase validators.
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.
Package migrations contains the system PocketBase DB migrations.
Package migrations contains the system PocketBase DB migrations.
Package models implements all PocketBase DB models and DTOs.
Package models implements all PocketBase DB models and DTOs.
schema
Package schema implements custom Schema and SchemaField datatypes for handling the Collection schema definitions.
Package schema implements custom Schema and SchemaField datatypes for handling the Collection schema definitions.
plugins
jsvm
Package jsvm implements optional utilities for binding a JS goja runtime to the PocketBase instance (loading migrations, attaching to app hooks, etc.).
Package jsvm implements optional utilities for binding a JS goja runtime to the PocketBase instance (loading migrations, attaching to app hooks, etc.).
migratecmd
Package migratecmd adds a new "migrate" command support to a PocketBase instance.
Package migratecmd adds a new "migrate" command support to a PocketBase instance.
Package resolvers contains custom search.FieldResolver implementations.
Package resolvers contains custom search.FieldResolver implementations.
Package tests provides common helpers and mocks used in PocketBase application tests.
Package tests provides common helpers and mocks used in PocketBase application tests.
Package tokens implements various user and admin tokens generation methods.
Package tokens implements various user and admin tokens generation methods.
tools
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.
Package ui handles the PocketBase Admin frontend embedding.
Package ui handles the PocketBase Admin frontend embedding.

Jump to

Keyboard shortcuts

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