admin

package
v1.0.1-0...-2caaea8 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 23 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 {
	// contains filtered or unexported fields
}

func NewAdmin

func NewAdmin(devMode bool, svc proto.TaoBlogServer, auth1 *auth.Auth, prefix string, domain, displayName string, origins []string, options ...Option) *Admin

func (*Admin) Handler

func (a *Admin) Handler() http.Handler

fs 可以传 nil,表示使用 embed 文件系统。

type EditorData

type EditorData struct {
	User *auth.User
	Post *proto.Post
}

type LoginData

type LoginData struct {
	Name           string
	GoogleClientID string
	GitHubClientID string
}

func (*LoginData) HasSocialLogins

func (d *LoginData) HasSocialLogins() bool

type Option

type Option func(a *Admin)

func WithCustomThemes

func WithCustomThemes(t *config.ThemeConfig) Option

type ProfileData

type ProfileData struct {
	Name string
	User *auth.User
}

func (*ProfileData) PublicKeys

func (d *ProfileData) PublicKeys() []string

Jump to

Keyboard shortcuts

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