entities

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: BSD-3-Clause Imports: 11 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigBuilder = func() interface{} {
	return new(Config)
}

Functions

This section is empty.

Types

type AnalyticsHTTPRequestMetadata

type AnalyticsHTTPRequestMetadata struct {
	RequestID  string `json:"request_id"`
	URL        string `json:"url"`
	Method     string `json:"http_method"`
	Origin     string `json:"origin"`
	Proto      string `json:"http_protocol"`
	RemoteAddr string `json:"ip_address"`
	Timestamp  int64  `json:"timestamp"`
	External   bool   `json:"external_content"`
}

func (*AnalyticsHTTPRequestMetadata) EntityName

func (*AnalyticsHTTPRequestMetadata) EntityName() string

func (*AnalyticsHTTPRequestMetadata) GetRepositoryToken

func (*AnalyticsHTTPRequestMetadata) GetRepositoryToken() tokens.RepositoryToken

type AnalyticsMetric

type AnalyticsMetric struct {
	MetricID string `json:"metric_id"`
	Date     string `json:"date"`
	Total    int    `json:"total"`
	Unique   int    `json:"unique"`
}

func (*AnalyticsMetric) EntityName

func (*AnalyticsMetric) EntityName() string

func (*AnalyticsMetric) GetRepositoryToken

func (*AnalyticsMetric) GetRepositoryToken() tokens.RepositoryToken

type AuthToken

type AuthToken struct {
	Expires time.Time
	Token   string
}

type Config

type Config struct {
	item.Item

	Name                    string `json:"name"`
	Domain                  string `json:"domain"`
	BindAddress             string `json:"bind_addr"`
	HTTPPort                string `json:"http_port"`
	HTTPSPort               string `json:"https_port"`
	AdminEmail              string `json:"admin_email"`
	ClientSecret            string `json:"client_secret"`
	Etag                    string `json:"etag"`
	DisableCORS             bool   `json:"cors_disabled"`
	DisableGZIP             bool   `json:"gzip_disabled"`
	DisableHTTPCache        bool   `json:"cache_disabled"`
	CacheMaxAge             int64  `json:"cache_max_age"`
	BackupBasicAuthUser     string `json:"backup_basic_auth_user"`
	BackupBasicAuthPassword string `json:"backup_basic_auth_password"`
}

Config represents the configurable options of the system

func (*Config) EntityName

func (*Config) EntityName() string

func (*Config) GetRepositoryToken

func (*Config) GetRepositoryToken() tokens.RepositoryToken

func (*Config) GetTitle

func (c *Config) GetTitle() string

func (*Config) MarshalEditor

func (c *Config) MarshalEditor(paths config.Paths) ([]byte, error)

MarshalEditor writes a buffer of templates to edit a Post and partially implements editor.Editable

func (*Config) Time added in v0.5.0

func (*Config) Time() int64

type Credential

type Credential struct {
	Type  CredentialType `json:"type"`
	Value string         `json:"value"`
}

type CredentialHash

type CredentialHash struct {
	UserId string         `json:"user_id"`
	Type   CredentialType `json:"type"`
	Value  []byte         `json:"value"`
}

func (*CredentialHash) EntityName

func (*CredentialHash) EntityName() string

func (*CredentialHash) GetRepositoryToken

func (*CredentialHash) GetRepositoryToken() tokens.RepositoryToken

type CredentialType

type CredentialType string
var CredentialTypePassword CredentialType = "password"

type CustomizableSearchAttributes

type CustomizableSearchAttributes interface {
	GetSearchableAttributes() map[string]reflect.Type
}

type FileUpload

type FileUpload struct {
	item.Item

	Name          string `json:"name"`
	Path          string `json:"path"`
	ContentLength int64  `json:"content_length"`
	ContentType   string `json:"content_type"`
}

FileUpload represents the file uploaded to the system

func (*FileUpload) EntityName

func (*FileUpload) EntityName() string

func (*FileUpload) GetRepositoryToken

func (*FileUpload) GetRepositoryToken() tokens.RepositoryToken

func (*FileUpload) GetTitle

func (f *FileUpload) GetTitle() string

func (*FileUpload) IndexContent

func (f *FileUpload) IndexContent() bool

IndexContent determines if FileUpload should be indexed for searching

func (*FileUpload) MarshalEditor

func (f *FileUpload) MarshalEditor(paths config.Paths) ([]byte, error)

MarshalEditor writes a buffer of templates to edit a Post and partially implements editor.Editable

func (*FileUpload) Push

func (f *FileUpload) Push() []string

type Pagination

type Pagination struct {
	Count  int
	Offset int
}

type PasswordHash

type PasswordHash struct {
	Hash string `json:"hash"`
	Salt string `json:"salt"`
}

type Persistable

type Persistable interface {
	GetRepositoryToken() tokens.RepositoryToken
}

type RecoveryKey

type RecoveryKey struct {
	Email string `json:"email"`
	Value string `json:"value"`
}

func (*RecoveryKey) EntityName

func (*RecoveryKey) EntityName() string

func (*RecoveryKey) GetRepositoryToken

func (*RecoveryKey) GetRepositoryToken() tokens.RepositoryToken

type ResponseStream

type ResponseStream struct {
	ContentType        string
	ContentDisposition string
	Payload            io.Reader
}
type Search struct {
	Query      string
	SortOrder  constants.SortOrder
	Pagination *Pagination
}

type SearchIndexable

type SearchIndexable interface {
	IndexContent() bool
}

type Slug

type Slug struct {
	EntityType string `json:"entity_type"`
	EntityId   string `json:"entity_id"`
	Slug       string `json:"slug"`
}

func (*Slug) EntityName

func (*Slug) EntityName() string

func (*Slug) GetRepositoryToken

func (*Slug) GetRepositoryToken() tokens.RepositoryToken

type User

type User struct {
	ID    string `json:"-"`
	Email string `json:"email"`
}

func (*User) EntityName

func (*User) EntityName() string

func (*User) GetRepositoryToken

func (*User) GetRepositoryToken() tokens.RepositoryToken

func (*User) ItemID

func (user *User) ItemID() string

func (*User) SetItemID

func (user *User) SetItemID(id string)

Jump to

Keyboard shortcuts

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