extras

package
v0.0.0-...-dae269f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapters

type Adapters struct {
	ingredient.Base
	Dependencies struct {
		PHP *php.PHP
	}
}

Prefixes implements reading and writing prefix

func (*Adapters) CreateDistilleryAdapter

func (wisski *Adapters) CreateDistilleryAdapter(ctx context.Context, server *phpx.Server, adapter DistilleryAdapter) error

type Block

type Block struct {
	Info    string
	Content template.HTML

	Region  string
	BlockID string
}

type Blocks

type Blocks struct {
	ingredient.Base
	Dependencies struct {
		PHP *php.PHP
	}
}

func (*Blocks) Create

func (blocks *Blocks) Create(ctx context.Context, server *phpx.Server, block Block) (err error)

Create creates a new block with the given title and html content

func (*Blocks) GetFooterRegion

func (blocks *Blocks) GetFooterRegion(ctx context.Context, server *phpx.Server) (region string, err error)

type DistilleryAdapter

type DistilleryAdapter struct {
	Label          string
	MachineName    string
	Description    string
	InstanceDomain string

	GraphDBRepository string
	GraphDBUsername   string
	GraphDBPassword   string
}

type Pathbuilder

type Pathbuilder struct {
	ingredient.Base
	Dependencies struct {
		PHP *php.PHP
	}
}

func (*Pathbuilder) All

func (pathbuilder *Pathbuilder) All(ctx context.Context, server *phpx.Server) (ids []string, err error)

All returns the ids of all pathbuilders in consistent order.

server is the server to fetch the pathbuilders from, any may be nil.

func (*Pathbuilder) Fetch

func (pathbuilder *Pathbuilder) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error)

func (*Pathbuilder) Get

func (pathbuilder *Pathbuilder) Get(ctx context.Context, server *phpx.Server, id string) (xml string, err error)

Get returns a single pathbuilder as xml. If it does not exist, it returns the empty string and nil error.

server is the server to fetch the pathbuilders from, any may be nil.

func (*Pathbuilder) GetAll

func (pathbuilder *Pathbuilder) GetAll(ctx context.Context, server *phpx.Server) (pathbuilders map[string]string, err error)

GetAll returns all pathbuilders serialized as xml

server is the server to fetch the pathbuilders from, any may be nil.

type Prefixes

type Prefixes struct {
	ingredient.Base
	Dependencies struct {
		PHP    *php.PHP
		MStore *mstore.MStore
	}
}

Prefixes implements reading and writing prefix

func (*Prefixes) All

func (prefixes *Prefixes) All(ctx context.Context, server *phpx.Server) ([]string, error)

All returns the prefixes applying to this WissKI

server is an optional server to fetch prefixes from. server may be nil.

func (*Prefixes) AllCached

func (wisski *Prefixes) AllCached(ctx context.Context) (results []string, err error)

Prefixes returns the cached prefixes from the given instance

func (*Prefixes) Fetch

func (prefixes *Prefixes) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error)

func (*Prefixes) NoPrefix

func (prefixes *Prefixes) NoPrefix() bool

NoPrefix checks if this WissKI instance is excluded from generating prefixes. TODO: Move this to the database!

func (*Prefixes) Update

func (wisski *Prefixes) Update(ctx context.Context) error

Update updates the cached prefixes of this instance

type Requirements

type Requirements struct {
	ingredient.Base
	Dependencies struct {
		PHP *php.PHP
	}
}

func (*Requirements) Fetch

func (requirements *Requirements) Fetch(flags ingredient.FetcherFlags, target *status.WissKI) error

Fetch fetches information

func (*Requirements) Get

func (requirements *Requirements) Get(ctx context.Context, server *phpx.Server) (data []status.Requirement, err error)

Create creates a new block with the given title and html content

type Settings

type Settings struct {
	ingredient.Base
	Dependencies struct {
		PHP *php.PHP
	}
}

func (*Settings) Get

func (settings *Settings) Get(ctx context.Context, server *phpx.Server, key string) (value any, err error)

func (*Settings) Set

func (settings *Settings) Set(ctx context.Context, server *phpx.Server, key string, value any) error

func (*Settings) SetTrustedDomain

func (settings *Settings) SetTrustedDomain(ctx context.Context, server *phpx.Server, domain string) error

type Stats

type Stats struct {
	ingredient.Base
	Dependencies struct {
		PHP *php.PHP
	}
}

func (*Stats) Fetch

func (stats *Stats) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error)

func (*Stats) Get

func (stats *Stats) Get(ctx context.Context, server *phpx.Server) (data status.Statistics, err error)

Get fetches all statistics from the server

type Theme

type Theme struct {
	ingredient.Base
	Dependencies struct {
		PHP *php.PHP
	}
}

Prefixes implements reading and writing prefix

func (*Theme) Fetch

func (t *Theme) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error)

func (*Theme) Get

func (t *Theme) Get(ctx context.Context, server *phpx.Server) (theme string, err error)

Get returns the currently active theme

Jump to

Keyboard shortcuts

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