content

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSlugRequired         = errors.New("slug is required")
	ErrTitleRequired        = errors.New("title is required")
	ErrBodySourceConflict   = errors.New("use either inline markdown or markdown file, not both")
	ErrNoUpdateFields       = errors.New("no update fields were provided")
	ErrVisibilityInvalid    = errors.New("visibility must be one of public, draft, or unlisted")
	ErrAuthIdentityRequired = errors.New("active identity is required")
)

Functions

This section is empty.

Types

type CommandResult

type CommandResult struct {
	Data     map[string]any
	Summary  string
	Warnings []string
}

type CreatePageParams

type CreatePageParams struct {
	Slug       string
	Title      string
	Body       string
	Visibility string
}

type RenamePageParams

type RenamePageParams struct {
	Slug string
	To   string
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(resolved *appconfig.Resolved) (*Service, error)

func (*Service) Config

func (s *Service) Config() *appconfig.Resolved

func (*Service) CreatePage

func (s *Service) CreatePage(ctx context.Context, params CreatePageParams) (*CommandResult, error)

func (*Service) DeletePage

func (s *Service) DeletePage(ctx context.Context, slug string) (*CommandResult, error)

func (*Service) GetPage

func (s *Service) GetPage(ctx context.Context, slug string) (*CommandResult, error)

func (*Service) ListPages

func (s *Service) ListPages(ctx context.Context) (*CommandResult, error)

func (*Service) RenamePage

func (s *Service) RenamePage(ctx context.Context, params RenamePageParams) (*CommandResult, error)

func (*Service) UpdatePage

func (s *Service) UpdatePage(ctx context.Context, params UpdatePageParams) (*CommandResult, error)

type ServiceError

type ServiceError = identityServiceError

type UpdatePageParams

type UpdatePageParams struct {
	Slug       string
	Title      string
	Body       *string
	Visibility *string
}

Jump to

Keyboard shortcuts

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