models

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	pb_models.BaseModel

	Avatar int    `json:"avatar"`
	Email  string `json:"email"`
}

type AdminCreateRequest

type AdminCreateRequest struct {
	// optional id
	Id *string `json:"id,omitempty"`
	// required email
	Email           string `json:"email"`
	Password        string `json:"password"`
	PasswordConfirm string `json:"passwordConfirm"`
	// optional avatar
	Avatar *int `json:"avatar,omitempty"`
}

type AdminList

type AdminList struct {
	Page       int     `json:"page"`
	PerPage    int     `json:"perPage"`
	TotalItems int     `json:"totalItems"`
	TotalPages int     `json:"totalPages"`
	Admins     []Admin `json:"items"`
}

type AdminUpdateRequest

type AdminUpdateRequest struct {
	// optional email
	Email *string `json:"email,omitempty"`
	// optional password
	Password        *string `json:"password,omitempty"`
	PasswordConfirm *string `json:"passwordConfirm,omitempty"`
	// optional avatar
	Avatar *int `json:"avatar,omitempty"`
}

type AuthToken

type AuthToken struct {
	Secret   string `json:"secret"`
	Duration int    `json:"duration"`
}

type Backups

type Backups struct {
	Cron        string `json:"cron"`
	CronMaxKeep int    `json:"cronMaxKeep"`
	S3          S3     `json:"s3"`
}

type Collection

type Collection struct {
	pb_models.BaseModel

	Name       string      `json:"name"`
	Type       string      `json:"type"`
	Schema     []Schema    `json:"schema"`
	ListRule   string      `json:"listRule"`
	ViewRule   string      `json:"viewRule"`
	CreateRule string      `json:"createRule"`
	UpdateRule string      `json:"updateRule"`
	DeleteRule string      `json:"deleteRule"`
	Options    interface{} `json:"options"`
	Indexes    []string    `json:"indexes"`
}

type CollectionCreateRequest

type CollectionCreateRequest struct {
	// optional id
	Id *string `json:"id,omitempty"`
	// required name
	Name string `json:"name"`
	// required type
	Type string `json:"type"`
	// required schema
	Schema []Schema `json:"schema"`
	// optional system
	System *bool `json:"system,omitempty"`
	// optional listRule
	ListRule *string `json:"listRule,omitempty"`
	// optional viewRule
	ViewRule *string `json:"viewRule,omitempty"`
	// optional createRule
	CreateRule *string `json:"createRule,omitempty"`
	// optional updateRule
	UpdateRule *string `json:"updateRule,omitempty"`
	// optional deleteRule
	DeleteRule *string `json:"deleteRule,omitempty"`
	// optional options
	Options *interface{} `json:"options,omitempty"`
	// optional indexes
	Indexes *[]string `json:"indexes,omitempty"`
}

type CollectionImportRequest

type CollectionImportRequest struct {
	// required collections
	Collections []Collection `json:"collections"`
	// optional deleteMissing bool
	DeleteMissing *bool `json:"deleteMissing,omitempty"`
}

type CollectionList

type CollectionList struct {
	Page        int          `json:"page"`
	PerPage     int          `json:"perPage"`
	TotalItems  int          `json:"totalItems"`
	TotalPages  int          `json:"totalPages"`
	Collections []Collection `json:"items"`
}

type CollectionUpdateRequest

type CollectionUpdateRequest struct {
	// required name
	Name *string `json:"name,omitempty"`
	// required type
	Type *string `json:"type,omitempty"`
	// required schema
	Schema *[]Schema `json:"schema,omitempty"`
	// optional system
	System *bool `json:"system,omitempty"`
	// optional listRule
	ListRule *string `json:"listRule,omitempty"`
	// optional viewRule
	ViewRule *string `json:"viewRule,omitempty"`
	// optional createRule
	CreateRule *string `json:"createRule,omitempty"`
	// optional updateRule
	UpdateRule *string `json:"updateRule,omitempty"`
	// optional deleteRule
	DeleteRule *string `json:"deleteRule,omitempty"`
	// optional options
	Options *interface{} `json:"options,omitempty"`
	// optional indexes
	Indexes *[]string `json:"indexes,omitempty"`
}

type EmailTemplate

type EmailTemplate struct {
	ActionUrl string `json:"actionUrl"`
	Body      string `json:"body"`
	Subject   string `json:"subject"`
}

type FacebookAuth

type FacebookAuth struct {
	Enabled            bool `json:"enabled"`
	AllowRegistrations bool `json:"allowRegistrations"`
}

type HealthResponse

type HealthResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

type Logs

type Logs struct {
	MaxDays int `json:"maxDays"`
}

type Meta

type Meta struct {
	AppName                    string        `json:"appName"`
	AppUrl                     string        `json:"appUrl"`
	HideControls               *bool         `json:"hideControls"`
	SenderName                 string        `json:"senderName"`
	SenderAddress              string        `json:"senderAddress"`
	VerificationTemplate       EmailTemplate `json:"verificationTemplate"`
	ResetPasswordTemplate      EmailTemplate `json:"resetPasswordTemplate"`
	ConfirmEmailChangeTemplate EmailTemplate `json:"confirmEmailChangeTemplate"`
}

type OAuthConfiguration

type OAuthConfiguration struct {
	Enabled      bool   `json:"enabled"`
	ClientId     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
}

type S3

type S3 struct {
	Enabled        bool   `json:"enabled"`
	Bucket         string `json:"bucket"`
	Region         string `json:"region"`
	Endpoint       string `json:"endpoint"`
	AccessKey      string `json:"accessKey"`
	Secret         string `json:"secret"`
	ForcePathStyle bool   `json:"forcePathStyle"`
}

type Schema

type Schema struct {
	System   bool        `json:"system"`
	ID       string      `json:"id"`
	Name     string      `json:"name"`
	Type     string      `json:"type"`
	Required bool        `json:"required"`
	Unique   bool        `json:"unique"`
	Options  interface{} `json:"options"`
}

type SettingsList

type SettingsList struct {
	Meta                     Meta               `json:"meta"`
	Logs                     Logs               `json:"logs"`
	Backups                  Backups            `json:"backups"`
	Smtp                     Smtp               `json:"smtp"`
	S3                       S3                 `json:"s3"`
	AdminAuthToken           AuthToken          `json:"adminAuthToken"`
	AdminPasswordResetToken  AuthToken          `json:"adminPasswordResetToken"`
	RecordAuthToken          AuthToken          `json:"recordAuthToken"`
	RecordPasswordResetToken AuthToken          `json:"recordPasswordResetToken"`
	RecordEmailChangeToken   AuthToken          `json:"recordEmailChangeToken"`
	RecordVerificationToken  AuthToken          `json:"recordVerificationToken"`
	GoogleAuth               OAuthConfiguration `json:"googleAuth"`
	FacebookAuth             FacebookAuth       `json:"facebookAuth"`
	GithubAuth               OAuthConfiguration `json:"githubAuth"`
	GitlabAuth               OAuthConfiguration `json:"gitlabAuth"`
	DiscordAuth              OAuthConfiguration `json:"discordAuth"`
	TwitterAuth              OAuthConfiguration `json:"twitterAuth"`
	MicrosoftAuth            OAuthConfiguration `json:"microsoftAuth"`
	SpotifyAuth              OAuthConfiguration `json:"spotifyAuth"`
}

type SettingsResponse

type SettingsResponse struct {
	Code    *string      `json:"code"`
	Message *string      `json:"message"`
	Data    *interface{} `json:"data"`
}

type SettingsS3StorageTestRequest

type SettingsS3StorageTestRequest struct {
	Filesystem string `json:"filesystem"`
}

type SettingsSendTestEmailRequest

type SettingsSendTestEmailRequest struct {
	Email    string `json:"email"`
	Template string `json:"template"`
}

type SettingsUpdateRequest

type SettingsUpdateRequest struct {
	Meta                     *Meta               `json:"meta,omitempty"`
	Logs                     *Logs               `json:"logs,omitempty"`
	Backups                  *Backups            `json:"backups,omitempty"`
	Smtp                     *Smtp               `json:"smtp,omitempty"`
	S3                       *S3                 `json:"s3,omitempty"`
	AdminAuthToken           *AuthToken          `json:"adminAuthToken,omitempty"`
	AdminPasswordResetToken  *AuthToken          `json:"adminPasswordResetToken,omitempty"`
	RecordAuthToken          *AuthToken          `json:"recordAuthToken,omitempty"`
	RecordPasswordResetToken *AuthToken          `json:"recordPasswordResetToken,omitempty"`
	RecordEmailChangeToken   *AuthToken          `json:"recordEmailChangeToken,omitempty"`
	RecordVerificationToken  *AuthToken          `json:"recordVerificationToken,omitempty"`
	GoogleAuth               *OAuthConfiguration `json:"googleAuth,omitempty"`
	FacebookAuth             *FacebookAuth       `json:"facebookAuth,omitempty"`
	GithubAuth               *OAuthConfiguration `json:"githubAuth,omitempty"`
	GitlabAuth               *OAuthConfiguration `json:"gitlabAuth,omitempty"`
	DiscordAuth              *OAuthConfiguration `json:"discordAuth,omitempty"`
	TwitterAuth              *OAuthConfiguration `json:"twitterAuth,omitempty"`
	MicrosoftAuth            *OAuthConfiguration `json:"microsoftAuth,omitempty"`
	SpotifyAuth              *OAuthConfiguration `json:"spotifyAuth,omitempty"`
}

type Smtp

type Smtp struct {
	Enabled  bool   `json:"enabled"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	Tls      bool   `json:"tls"`
}

Jump to

Keyboard shortcuts

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