protobuff

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: Apache-2.0 Imports: 0 Imported by: 2 modules, 12 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

This section is empty.

Functions

This section is empty.

Types

type APIToken

type APIToken struct {
	ProjectID string `json:"project_id,omitempty" firestore:"project_id,omitempty"`
	Name      string `json:"name,omitempty" firestore:"name,omitempty"`
	Token     string `json:"token,omitempty" firestore:"token,omitempty"`
	Expire    string `json:"expire,omitempty" firestore:"expire,omitempty"`
}

type CloudFunction

type CloudFunction struct {
	ProjectID                string                            `bun:"type:uuid,pk" json:"project_id,omitempty" firestore:"project_id,omitempty"`
	ID                       string                            `json:"id,omitempty" firestore:"id,omitempty"`
	Name                     string                            `json:"name,omitempty" firestore:"name,omitempty"`
	Description              string                            `json:"description,omitempty" firestore:"description,omitempty"`
	EnvVars                  []*FunctionEnvVariables           `json:"env_vars,omitempty" firestore:"env_vars,omitempty"`
	FunctionPath             string                            `json:"function_path,omitempty" firestore:"function_path,omitempty"`
	Request                  *CloudFunctionRequestResponseType `json:"request,omitempty" firestore:"request,omitempty"`
	Response                 *CloudFunctionRequestResponseType `json:"response,omitempty" firestore:"response,omitempty"`
	FunctionProviderId       string                            `json:"function_provider_id,omitempty" firestore:"function_provider_id,omitempty"`
	FunctionConnected        bool                              `json:"function_connected,omitempty" firestore:"function_connected,omitempty"`
	ProviderExportedVariable string                            `json:"provider_exported_variable,omitempty" firestore:"provider_exported_variable,omitempty"`
	FunctionExportedVariable string                            `json:"function_exported_variable,omitempty" firestore:"function_exported_variable,omitempty"`
	RuntimeConfig            *FunctionRuntimeConfig            `json:"runtime_config,omitempty" firestore:"runtime_config,omitempty"`
	UpdatedAt                string                            `bun:",nullzero,notnull,default:current_timestamp" json:"updated_at,omitempty" firestore:"updated_at,omitempty"`
	CreatedAt                string                            `bun:",nullzero,notnull,default:current_timestamp" json:"created_at,omitempty" firestore:"created_at,omitempty"`
}

type CloudFunctionRequestResponseType

type CloudFunctionRequestResponseType struct {
	Model  string       `json:"model,omitempty" firestore:"model,omitempty"`
	Params []*FieldInfo `json:"params,omitempty" firestore:"params,omitempty"`
}

type ConnectionType

type ConnectionType struct {
	ConnectionID string `json:"connection_id,omitempty" firestore:"connection_id,omitempty"`
	Model        string `json:"model,omitempty" firestore:"model,omitempty"`
	Relation     string `json:"relation,omitempty" firestore:"relation,omitempty"`
	Type         string `json:"type,omitempty" firestore:"type,omitempty"`
	KnownAs      string `json:"known_as,omitempty" firestore:"known_as,omitempty"`
}

type DriverCredentials

type DriverCredentials struct {
	// for sql migration purposes
	ProjectID string `bun:"type:uuid,pk" json:"project_id,omitempty" firestore:"project_id,omitempty"`
	// normal sql & nosql database
	Engine   string `json:"engine,omitempty"`
	Host     string `json:"host,omitempty"`
	Port     string `json:"port,omitempty"`
	User     string `json:"user,omitempty"`
	Password string `json:"password,omitempty"`
	Database string `json:"database,omitempty"`
	// for firebase
	FirebaseProjectId             string `json:"firebase_project_id,omitempty"`
	FirebaseProjectCredentialJson string `json:"firebase_project_credential_json,omitempty"`
	// for dynamodb
	AccessKey string `json:"access_key,omitempty"`
	SecretKey string `json:"secret_key,omitempty"`
	// for embedded database
	DatabaseDir string `json:"database_dir,omitempty"`
}

type FieldInfo

type FieldInfo struct {
	FieldID                 string       `bun:",pk" json:"field_id,omitempty" firestore:"field_id,omitempty"`
	Identifier              string       `json:"identifier,omitempty" firestore:"identifier,omitempty"`
	Description             string       `json:"description,omitempty" firestore:"description,omitempty"`
	InputType               string       `json:"input_type,omitempty" firestore:"input_type,omitempty"`
	FieldType               string       `json:"field_type,omitempty" firestore:"field_type,omitempty"`
	FieldSubType            string       `json:"field_sub_type,omitempty"`
	SubFieldInfo            []*FieldInfo `json:"sub_field_info,omitempty" firestore:"modules,omitempty"`
	Validation              *Validation  `json:"validation,omitempty" firestore:"validation,omitempty"`
	Serial                  uint32       `json:"serial,omitempty" firestore:"serial,omitempty"`
	Label                   string       `json:"label,omitempty" firestore:"label,omitempty"`
	SystemGenerated         bool         `json:"system_generated,omitempty" firestore:"system_generated,omitempty"`
	RepeatedGroupIdentifier string       `json:"repeated_group_identifier,omitempty" firestore:"repeated_group_identifier,omitempty"`
	IsObjectField           bool         `json:"is_object_field,omitempty" firestore:"is_object_field,omitempty"`
	ParentField             string       `json:"parent_field,omitempty" firestore:"parent_field,omitempty"`
}

type FileDetails

type FileDetails struct {
	Id            string        `json:"id,omitempty" firestore:"id,omitempty"`
	XKey          string        `json:"_key,omitempty" firestore:"_key,omitempty"`
	Type          string        `json:"type,omitempty" firestore:"type,omitempty"`
	FileExtension string        `json:"file_extension,omitempty" firestore:"file_extension,omitempty"`
	FileName      string        `json:"file_name,omitempty" firestore:"file_name,omitempty"`
	ContentType   string        `json:"content_type,omitempty" firestore:"content_type,omitempty"`
	Size          int64         `json:"size,omitempty" firestore:"size,omitempty"`
	S3Key         string        `json:"s3_key,omitempty" firestore:"s3_key,omitempty"`
	Url           string        `json:"url,omitempty" firestore:"url,omitempty"`
	CreatedAt     string        `json:"created_at,omitempty" firestore:"created_at,omitempty"`
	UploadParam   *UploadParams `json:"upload_param,omitempty" firestore:"upload_param,omitempty"`
	Buffer        []byte        `json:"buffer,omitempty" firestore:"upload_param,omitempty"`
}
type FileLink struct {
	Link      string `json:"link,omitempty" firestore:"link,omitempty"`
	Title     string `json:"title,omitempty" firestore:"title,omitempty"`
	CreatedAt string `json:"created_at,omitempty" firestore:"created_at,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty" firestore:"updated_at,omitempty"`
}

File Picker

type FilePickParameter

type FilePickParameter struct {
	NumberOfImages uint32      `json:"number_of_images,omitempty" firestore:"number_of_images,omitempty"`
	S3Folder       string      `json:"s3_folder,omitempty" firestore:"s3_folder,omitempty"`
	PickerTitle    string      `json:"picker_title,omitempty" firestore:"picker_title,omitempty"`
	Origin         *SystemUser `json:"origin,omitempty" firestore:"origin,omitempty"`
}

type Filter

type Filter struct {
	Page     uint32 `json:"page,omitempty" firestore:"page,omitempty"`
	Offset   uint32 `json:"offset,omitempty" firestore:"offset,omitempty"`
	Limit    uint32 `json:"limit,omitempty" firestore:"limit,omitempty"`
	Order    string `json:"order,omitempty" firestore:"order,omitempty"`
	Min      uint32 `json:"min,omitempty" firestore:"min,omitempty"`
	Max      uint32 `json:"max,omitempty" firestore:"max,omitempty"`
	Category string `json:"category,omitempty" firestore:"category,omitempty"`
}

type FunctionEnvVariables

type FunctionEnvVariables struct {
	Key   string `json:"key,omitempty" firestore:"key,omitempty"`
	Value string `json:"value,omitempty" firestore:"value,omitempty"`
}

type FunctionRuntimeConfig

type FunctionRuntimeConfig struct {
	Runtime string `json:"runtime,omitempty" firestore:"runtime,omitempty"`
	Memory  int64  `json:"memory,omitempty" firestore:"memory,omitempty"`
	Handler string `json:"handler,omitempty" firestore:"handler,omitempty"`
	TimeOut int64  `json:"time_out,omitempty" firestore:"time_out,omitempty"`
}

type ImageMetaInfo

type ImageMetaInfo struct {
	Identifier string `json:"identifier,omitempty" firestore:"identifier,omitempty"`
	Name       string `json:"name,omitempty" firestore:"name,omitempty"`
	Width      uint32 `json:"width,omitempty" firestore:"width,omitempty"`
	Height     uint32 `json:"height,omitempty" firestore:"height,omitempty"`
	Type       string `json:"type,omitempty" firestore:"type,omitempty"`
}

type InitParams

type InitParams struct {
	ProjectID string             `json:"project_id"`
	ProjectDB *DriverCredentials `json:"system_credentials"`
	CacheDB   *DriverCredentials `json:"cache_db"`
}

type LoginRequest

type LoginRequest struct {
	Username string `json:"username,omitempty" firestore:"username,omitempty"`
	Email    string `json:"email,omitempty" firestore:"email,omitempty"`
	Secret   string `json:"secret,omitempty" firestore:"secret,omitempty"`
}

type MetaField

type MetaField struct {
	CreatedAt string `json:"created_at,omitempty" firestore:"created_at,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty" firestore:"updated_at,omitempty"`
	Status    string `json:"status,omitempty" firestore:"status,omitempty"`
}

type ModelType

type ModelType struct {
	ProjectID       string            `bun:"type:uuid,pk" json:"project_id,omitempty" firestore:"project_id,omitempty"`
	ModelID         string            `bun:",pk" json:"model_id,omitempty" firestore:"model_id,omitempty"`
	Fields          []*FieldInfo      `bun:"rel:has-many,join:model_id=field_id" json:"fields,omitempty" firestore:"fields,omitempty"`
	Connections     []*ConnectionType `bun:"rel:has-many,join:model_id=connection_id"  json:"connections,omitempty" firestore:"connections,omitempty"`
	Name            string            `json:"name,omitempty" firestore:"name,omitempty"`
	Description     string            `json:"description,omitempty"`
	HookIds         []string          `json:"hook_ids,omitempty" firestore:"hook_ids,omitempty"`
	Locals          []string          `json:"locals,omitempty" firestore:"locals,omitempty"`
	RepeatedGroups  []string          `json:"repeated_groups,omitempty" firestore:"locals,omitempty"`
	SystemGenerated bool              `json:"system_generated,omitempty" firestore:"system_generated,omitempty"`
	SinglePage      bool              `json:"single_page,omitempty" firestore:"system_generated,omitempty"`
	SinglePageUuid  string            `json:"single_page_uuid,omitempty" firestore:"system_generated,omitempty"`
	HasConnections  bool              `json:"has_connections,omitempty" firestore:"has_connections,omitempty"`
}

type PassChangeRequest

type PassChangeRequest struct {
	OldPassword string `json:"old_password,omitempty" firestore:"old_password,omitempty"`
	NewPassword string `json:"new_password,omitempty" firestore:"new_password,omitempty"`
}

type PictureDeleteRequest

type PictureDeleteRequest struct {
	Urls      []string `json:"urls,omitempty" firestore:"urls,omitempty"`
	Model     string   `json:"model,omitempty" firestore:"model,omitempty"`
	Id        string   `json:"id,omitempty" firestore:"id,omitempty"`
	FieldName string   `json:"field_name,omitempty" firestore:"field_name,omitempty"`
}

type PluginActivateStatus

type PluginActivateStatus int32
const (
	PluginActivateStatus_deactivated PluginActivateStatus = 0
	PluginActivateStatus_activated   PluginActivateStatus = 1
)

type PluginDetails

type PluginDetails struct {
	ProjectID        string                  `json:"project_id,omitempty" firestore:"project_id,omitempty"`
	Icon             string                  `json:"icon,omitempty" firestore:"icon,omitempty"`
	ID               string                  `json:"id,omitempty" firestore:"id,omitempty"`
	Title            string                  `json:"title,omitempty" firestore:"title,omitempty"`
	Serial           int64                   `json:"serial,omitempty" firestore:"serial,omitempty"`
	Version          string                  `json:"version,omitempty" firestore:"version,omitempty"`
	Description      string                  `json:"description,omitempty" firestore:"description,omitempty"`
	Type             PluginType              `json:"type,omitempty" firestore:"type,omitempty"`
	EnvVars          []*FunctionEnvVariables `json:"env_vars,omitempty" firestore:"env_vars,omitempty"`
	ExportedVariable string                  `json:"exported_variable,omitempty" firestore:"exported_variable,omitempty"`
	Enable           bool                    `json:"enable,omitempty" firestore:"enable,omitempty"`
	RepositoryUrl    string                  `json:"repository_url,omitempty" firestore:"repository_url,omitempty"`
	Branch           string                  `json:"branch,omitempty" firestore:"branch,omitempty"`
	Author           string                  `json:"author,omitempty" firestore:"author,omitempty"`
	LoadStatus       PluginLoadStatus        `json:"load_status,omitempty" firestore:"load_status,omitempty"`
	ActivateStatus   PluginActivateStatus    `json:"activate_status,omitempty" firestore:"activate_status,omitempty"`
}

type PluginLoadStatus

type PluginLoadStatus int32
const (
	PluginLoadStatus_NotInstalled PluginLoadStatus = 0
	PluginLoadStatus_Installed    PluginLoadStatus = 1
	PluginLoadStatus_ReInstall    PluginLoadStatus = 2
	PluginLoadStatus_Loading      PluginLoadStatus = 3
	PluginLoadStatus_Loaded       PluginLoadStatus = 4
	PluginLoadStatus_LoadFailed   PluginLoadStatus = 5
)

type PluginType

type PluginType int32
const (
	PluginType_NormalPlugin PluginType = 0 // auth, customFunction etc
	PluginType_Function     PluginType = 1 // go-plugin, aws-lambda etc
	PluginType_Storage      PluginType = 2 // s3, cloudinary etc
)

type PreviewMode

type PreviewMode struct {
	Title  string `json:"title,omitempty" firestore:"title,omitempty"`
	Icon   string `json:"icon,omitempty" firestore:"icon,omitempty"`
	Status string `json:"status,omitempty" firestore:"status,omitempty"`
	Id     string `json:"id,omitempty" firestore:"id,omitempty"`
}

type Project

type Project struct {
	XKey         string `json:"_key,omitempty" firestore:"_key,omitempty"`
	ID           string `bun:"type:uuid,pk" json:"id,omitempty" firestore:"id,omitempty"`
	SystemUserID string `bun:"type:uuid,notnull" json:"system_user_id,omitempty" firestore:"system_user_id,omitempty"`

	Name        string         `json:"name,omitempty" firestore:"name,omitempty"`
	Description string         `json:"description,omitempty" firestore:"description,omitempty"`
	Schema      *ProjectSchema `bun:"-" json:"schema,omitempty" firestore:"schema,omitempty"`

	ExpireAt string           `json:"expire_at,omitempty" firestore:"expire_at,omitempty"`
	Plugins  []*PluginDetails `bun:"rel:has-many" json:"plugins,omitempty" firestore:"plugins,omitempty"`
	Tokens   []*APIToken      `bun:"rel:has-many" json:"tokens,omitempty" firestore:"tokens,omitempty"`

	ProjectTemplate string           `json:"project_template,omitempty" firestore:"project_template,omitempty"`
	SystemMessages  []*SystemMessage `bun:"rel:has-many" json:"system_messages,omitempty" firestore:"system_messages,omitempty"`

	DefaultStoragePlugin  string `json:"default_storage_plugin,omitempty" firestore:"default_storage_plugin,omitempty"`
	DefaultFunctionPlugin string `json:"default_function_plugin,omitempty" firestore:"default_function_plugin,omitempty"`

	Locals []string `json:"locals,omitempty" firestore:"locals,omitempty"`

	CreatedAt string `json:"created_at,omitempty" firestore:"created_at,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty" firestore:"updated_at,omitempty"`
}

Project user project

type ProjectCreateRequest

type ProjectCreateRequest struct {
	ID          string             `json:"id"`
	Name        string             `json:"name"`
	Description string             `json:"description"`
	Token       string             `json:"token"`
	Engine      string             `json:"engine"`
	Driver      *DriverCredentials `json:"driver"`
	Example     string             `json:"example"`
}

type ProjectSchema

type ProjectSchema struct {
	Models    []*ModelType     `bun:"rel:has-many" json:"models,omitempty" firestore:"models,omitempty"`
	Functions []*CloudFunction `bun:"rel:has-many" json:"functions,omitempty" firestore:"functions,omitempty"`
}

type RegisterRequest

type RegisterRequest struct {
	User             *SystemUser `json:"user,omitempty" firestore:"user,omitempty"`
	VerificationCode string      `json:"verification_code,omitempty" firestore:"profession,omitempty"`
	AddedByAdmin     bool        `json:"added_by_admin,omitempty" firestore:"added_by_admin,omitempty"`
}

type Request

type Request struct {
	Id           string  `json:"id,omitempty" firestore:"id,omitempty"`
	Type         string  `json:"type,omitempty" firestore:"type,omitempty"`
	Filter       *Filter `json:"filter,omitempty" firestore:"filter,omitempty"`
	SearchString string  `json:"search_string,omitempty" firestore:"search_string,omitempty"`
	Retry        bool    `json:"retry,omitempty" firestore:"retry,omitempty"`
}

type Response

type Response struct {
	Message string `json:"message,omitempty"`
	Code    string `json:"code,omitempty"`
}

type SystemMessage

type SystemMessage struct {
	ProjectID   string `json:"project_id,omitempty" firestore:"project_id,omitempty"`
	Message     string `json:"message,omitempty" firestore:"message,omitempty"`
	Code        string `json:"code,omitempty" firestore:"code,omitempty"`
	Redirection string `json:"redirection,omitempty" firestore:"redirection,omitempty"`
	Hide        bool   `json:"hide,omitempty" firestore:"hide,omitempty"`
}

type SystemUser

type SystemUser struct {
	XKey             string `json:"_key,omitempty" firestore:"_key,omitempty"`
	ID               string `bun:"type:uuid,pk" json:"id,omitempty" firestore:"id,omitempty"`
	FirstName        string `json:"first_name,omitempty" firestore:"first_name,omitempty"`
	LastName         string `json:"last_name,omitempty" firestore:"last_name,omitempty"`
	Username         string `json:"username,omitempty" firestore:"username,omitempty"`
	Email            string `json:"email,omitempty" firestore:"email,omitempty"`
	Secret           string `json:"secret,omitempty" firestore:"secret,omitempty"`
	Avatar           string `json:"avatar,omitempty" firestore:"avatar,omitempty"`
	RegisterProvider string `json:"register_provider,omitempty" firestore:"register_provider,omitempty"`

	CurrentProjectId string `json:"current_project_id,omitempty" firestore:"current_project_id,omitempty"`

	Projects []*Project `bun:"rel:has-many,join:id=system_user_id" json:"projects,omitempty" firestore:"projects,omitempty"`

	RefreshToken string `json:"refresh_token,omitempty" firestore:"refresh_token,omitempty"`
	AccessToken  string `json:"access_token,omitempty" firestore:"access_token,omitempty"`
	LastLoggedIn string `json:"last_logged_in,omitempty" firestore:"last_logged_in,omitempty"`

	CreatedAt string `bun:"type:timestamp,notnull,default:current_timestamp" json:"created_at,omitempty" firestore:"created_at,omitempty"`
	UpdatedAt string `bun:"type:timestamp,notnull,default:current_timestamp" json:"updated_at,omitempty" firestore:"updated_at,omitempty"`
}

type UploadParams

type UploadParams struct {
	DocId      string `json:"doc_id,omitempty" firestore:"doc_id,omitempty"`
	ProjectId  string `json:"project_id,omitempty" firestore:"project_id,omitempty"`
	ModelName  string `json:"model_name,omitempty" firestore:"model_name,omitempty"`
	FieldName  string `json:"field_name,omitempty" firestore:"field_name,omitempty"`
	AllowMulti bool   `json:"allow_multi,omitempty" firestore:"allow_multi,omitempty"`
	Provider   string `json:"provider,omitempty" firestore:"provider,omitempty"`
}

type Validation

type Validation struct {
	Required          bool      `json:"required,omitempty" firestore:"required,omitempty"`
	Hide              bool      `json:"hide,omitempty" firestore:"hide,omitempty"`
	AsTitle           bool      `json:"as_title,omitempty" firestore:"as_title,omitempty"`
	Locals            []string  `json:"locals,omitempty" firestore:"locals,omitempty"`
	Unique            bool      `json:"unique,omitempty" firestore:"unique,omitempty"`
	CharLimit         []uint32  `json:"char_limit,omitempty" firestore:"char_limit,omitempty"`
	IntRangeLimit     []uint32  `json:"int_range_limit,omitempty" firestore:"int_range_limit,omitempty"`
	DoubleRangeLimit  []float64 `json:"double_range_limit,omitempty" firestore:"double_range_limit,omitempty"`
	IsEmail           bool      `json:"is_email,omitempty" firestore:"is_email,omitempty"`
	Placeholder       string    `json:"placeholder,omitempty" firestore:"placeholder,omitempty"`
	FixedListElements []string  `json:"fixed_list_elements,omitempty" firestore:"fixed_list_elements,omitempty"`
	IsMultiChoice     bool      `json:"is_multi_choice,omitempty" firestore:"is_multi_choice,omitempty"`
	ListType          string    `json:"list_type,omitempty" firestore:"list_type,omitempty"`
	IsGallery         bool      `json:"is_gallery,omitempty" firestore:"is_gallery,omitempty"`
	IsPassword        bool      `json:"is_password,omitempty" firestore:"is_gallery,omitempty"`
	IsSystemRole      bool      `json:"is_system_role,omitempty" firestore:"is_gallery,omitempty"`
	IsUrl             bool      `json:"is_url,omitempty" firestore:"is_url,omitempty"`
}

Jump to

Keyboard shortcuts

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