entity

package
v0.2.50 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

func (*Admin) ConfigEditor

func (a *Admin) ConfigEditor() ([]byte, error)

func (*Admin) InvalidateCache

func (a *Admin) InvalidateCache() error

func (*Admin) LoadConfig

func (a *Admin) LoadConfig() error

func (*Admin) Name

func (a *Admin) Name() string

func (*Admin) PutConfig

func (a *Admin) PutConfig(key string, value any) error

func (*Admin) RefreshETage

func (a *Admin) RefreshETage()

func (*Admin) SetConfig

func (a *Admin) SetConfig(data url.Values) error

type Administrator

type Administrator struct {
	Repo repository.Repository

	Log loggers.Logger
}

func (*Administrator) AllUsers

func (a *Administrator) AllUsers() ([]admin.User, error)

func (*Administrator) AllUsersExcept

func (a *Administrator) AllUsersExcept(one admin.User) ([]admin.User, error)

func (*Administrator) GetUser

func (a *Administrator) GetUser(email string) (admin.User, error)

func (*Administrator) IsUserExists

func (a *Administrator) IsUserExists(email string) bool

func (*Administrator) NewUser

func (a *Administrator) NewUser(email, password string) (admin.User, error)

func (*Administrator) ValidateUser

func (a *Administrator) ValidateUser(email, password string) error

type Cache

type Cache struct {
	Conf *valueobject.Config
}

func (*Cache) CacheMaxAge

func (a *Cache) CacheMaxAge() int64

func (*Cache) ETage

func (a *Cache) ETage() string

func (*Cache) NewETage

func (a *Cache) NewETage() string

type Caddy added in v0.2.3

type Caddy struct {
	Env  string
	Conf *valueobject.Config
}

func (*Caddy) CaddyAdminAPI added in v0.2.47

func (c *Caddy) CaddyAdminAPI() string

CaddyAdminAPI 返回 Caddy Admin API 地址(内部连接使用)

func (*Caddy) CaddyHost added in v0.2.3

func (c *Caddy) CaddyHost() string

func (*Caddy) CaddyPort added in v0.2.3

func (c *Caddy) CaddyPort() string

func (*Caddy) CaddyURL added in v0.2.3

func (c *Caddy) CaddyURL() string

CaddyURL 返回 Caddy 对外访问地址(已废弃,保留向后兼容) 推荐使用 CaddyAdminAPI() 获取 Admin API 地址

type Client

type Client struct {
	Conf *valueobject.Config
}

func (*Client) ClientSecret

func (a *Client) ClientSecret() string

type Controller

type Controller struct {
	Conf *valueobject.Config
}

func (*Controller) CacheDisabled

func (a *Controller) CacheDisabled() bool

func (*Controller) CorsDisabled

func (a *Controller) CorsDisabled() bool

func (*Controller) GzipDisabled

func (a *Controller) GzipDisabled() bool

type CouchDB added in v0.2.3

type CouchDB struct {
	Conf *valueobject.Config
}

func (*CouchDB) CouchDBAdminName added in v0.2.3

func (cdb *CouchDB) CouchDBAdminName() string

CouchDBAdminName 返回 CouchDB 管理员用户名

func (*CouchDB) CouchDBAdminPassword added in v0.2.3

func (cdb *CouchDB) CouchDBAdminPassword() string

CouchDBAdminPassword 返回 CouchDB 管理员密码

func (*CouchDB) CouchDBPrefix added in v0.2.3

func (cdb *CouchDB) CouchDBPrefix() string

CouchDBPrefix 返回用户数据库前缀

func (*CouchDB) CouchDBURL added in v0.2.3

func (cdb *CouchDB) CouchDBURL() string

CouchDBURL 返回 CouchDB 内部连接地址

type GitHub added in v0.2.30

type GitHub struct {
	Conf *valueobject.Config
}

GitHub GitHub 配置实体

func (*GitHub) GithubToken added in v0.2.30

func (g *GitHub) GithubToken() string

GithubToken 返回 GitHub Personal Access Token

func (*GitHub) HookSecret added in v0.2.30

func (g *GitHub) HookSecret() string

HookSecret 返回 GitHub Webhook Secret

func (*GitHub) TargetRepository added in v0.2.30

func (g *GitHub) TargetRepository() string

TargetRepository 返回目标仓库全名

type Http

type Http struct {
	Env  string
	Conf *valueobject.Config
}

func (*Http) BaseURL added in v0.2.3

func (h *Http) BaseURL() string

func (*Http) BindAddress added in v0.2.3

func (h *Http) BindAddress() string

func (*Http) CouchDBDomain added in v0.2.5

func (h *Http) CouchDBDomain() string

CouchDBDomain 返回 CouchDB 对外访问地址(给客户端使用) 对内连接地址使用 CouchDB entity 的 CouchDBURL() 方法

func (*Http) DevHttpsPort added in v0.2.3

func (h *Http) DevHttpsPort() string

func (*Http) DevPort added in v0.2.3

func (h *Http) DevPort() string

func (*Http) Domain added in v0.2.3

func (h *Http) Domain() string

Domain 返回配置的域名

func (*Http) Host added in v0.2.3

func (h *Http) Host() string

func (*Http) HttpPort added in v0.2.3

func (h *Http) HttpPort() string

func (*Http) HugoverseDomain added in v0.2.47

func (h *Http) HugoverseDomain() string

HugoverseDomain 返回 Hugoverse 对外访问地址(给客户端使用) 对内连接地址使用 hugoverse:1314

func (*Http) RootDomain added in v0.2.9

func (h *Http) RootDomain() string

RootDomain extracts the root domain (last two parts) from Domain() Examples: abc.example.com -> example.com, sub.abc.example.com -> example.com

func (*Http) ServerIP added in v0.2.5

func (h *Http) ServerIP() string

ServerIP 返回服务器公网 IP

func (*Http) SubBaseURL added in v0.2.3

func (h *Http) SubBaseURL(sub string) string

type Netlify

type Netlify struct {
	Conf *valueobject.Config
}

func (*Netlify) Token

func (a *Netlify) Token() string

type SMTP added in v0.2.30

type SMTP struct {
	Conf *valueobject.Config
}

SMTP SMTP 配置实体

func (*SMTP) From added in v0.2.30

func (s *SMTP) From() string

From 返回发件人邮箱地址

func (*SMTP) Host added in v0.2.30

func (s *SMTP) Host() string

Host 返回 SMTP 服务器地址

func (*SMTP) IsConfigured added in v0.2.30

func (s *SMTP) IsConfigured() bool

IsConfigured 检查 SMTP 是否已配置

func (*SMTP) Password added in v0.2.30

func (s *SMTP) Password() string

Password 返回 SMTP 密码

func (*SMTP) Port added in v0.2.30

func (s *SMTP) Port() int

Port 返回 SMTP 端口

func (*SMTP) UseTLS added in v0.2.30

func (s *SMTP) UseTLS() bool

UseTLS 返回是否使用 TLS

func (*SMTP) Username added in v0.2.30

func (s *SMTP) Username() string

Username 返回 SMTP 用户名

type Upload

type Upload struct {
	Repo repository.Repository
}

func (*Upload) AllUploads

func (a *Upload) AllUploads() ([][]byte, error)

func (*Upload) DeleteUpload

func (a *Upload) DeleteUpload(id string) error

func (*Upload) GetUpload

func (a *Upload) GetUpload(id string) ([]byte, error)

func (*Upload) NewUpload

func (a *Upload) NewUpload(data url.Values) (int, error)

func (*Upload) UploadCreator

func (a *Upload) UploadCreator() func() interface{}

Jump to

Keyboard shortcuts

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