Documentation ¶
Index ¶
- Constants
- Variables
- func AddKeyToItem(metaSaver storage.MetadataTyper, it vocab.Item, typ string) error
- func Before(c *cli.Context) error
- func Bootstrap(conf config.Options, service vocab.Item) error
- func ByName(names ...string) url.Values
- func ByType(types ...vocab.ActivityVocabularyType) url.Values
- func ByURL(urls ...vocab.IRI) url.Values
- func CreateService(r s.FullStorage, self vocab.Item) (err error)
- func Errf(s string, par ...any)
- func FilterFlags() []cli.Flag
- func IRIWithFilters(iri vocab.IRI, searchParams ...url.Values) vocab.IRI
- func LoadFilters(c *cli.Context) (*filters.Filters, error)
- func NewApp(version string) *cli.App
- func Reset(conf config.Options) error
- func SearchActorsIRI(baseIRI vocab.IRI, searchParams ...url.Values) vocab.IRI
- type Control
- func (c *Control) Add(types []string) (vocab.ItemCollection, error)
- func (c *Control) AddActor(p *vocab.Person, pw []byte, author vocab.Actor) (*vocab.Person, error)
- func (c *Control) AddClient(pw []byte, redirect []string, u any) (string, error)
- func (c *Control) AddObject(p *vocab.Object, author vocab.Actor) (*vocab.Object, error)
- func (c *Control) CopyObjects(to vocab.IRI, from ...vocab.Item) error
- func (c *Control) DeleteClient(id string) error
- func (c *Control) DeleteObjects(reason string, inReplyTo []string, ids ...string) error
- func (c *Control) GenAuthToken(clientID, actorIdentifier string, _ any) (string, error)
- func (c *Control) List(iris vocab.IRIs, types ...string) (vocab.ItemCollection, error)
- func (c *Control) ListClients() ([]osin.Client, error)
- func (c *Control) MoveObjects(to vocab.IRI, from ...vocab.Item) error
Constants ¶
View Source
const URISeparator = "\n"
Variables ¶
View Source
var AccountsCmd = &cli.Command{
Name: "accounts",
Usage: "Accounts helper",
Subcommands: []*cli.Command{
exportAccountsMetadataCmd,
importAccountsMetadataCmd,
generateKeysCmd,
},
}
View Source
var BootstrapCmd = &cli.Command{ Name: "bootstrap", Usage: "Bootstrap a new postgres or bolt database helper", Flags: []cli.Flag{ &cli.StringFlag{ Name: "root", Usage: "root account of postgres server (default: postgres)", Value: "postgres", }, &cli.StringFlag{ Name: "sql", Usage: "path to the queries for initializing the database", Value: "postgres", }, &cli.StringFlag{ Name: "key-type", Usage: fmt.Sprintf("Type of keys to generate: %v", []string{fedbox.KeyTypeED25519, fedbox.KeyTypeRSA}), Value: fedbox.KeyTypeED25519, }, }, Action: bootstrapAct(&ctl), Subcommands: []*cli.Command{ reset, }, }
View Source
var FixStorageCollectionsCmd = &cli.Command{
Name: "fix-storage",
Usage: "Fix storage collections helper",
Action: fixStorageCollectionsAct(&ctl),
}
View Source
var OAuth2Cmd = &cli.Command{
Name: "oauth",
Usage: "OAuth2 client and access token helper",
Subcommands: []*cli.Command{
client,
token,
},
}
View Source
var PubCmd = &cli.Command{ Name: "pub", Aliases: []string{"ap"}, Usage: "ActivityPub management helper", Subcommands: []*cli.Command{ actorsCmd, addObjectCmd, listObjectsCmd, showObjectCmd, delObjectsCmd, moveObjectsCmd, copyObjectsCmd, exportCmd, importCmd, }, }
View Source
var ValidGenericTypes = vocab.ActivityVocabularyTypes{vocab.ObjectType, vocab.ActorType}
Functions ¶
func AddKeyToItem ¶
func CreateService ¶
func CreateService(r s.FullStorage, self vocab.Item) (err error)
func FilterFlags ¶
func FilterFlags() []cli.Flag
func LoadFilters ¶
Types ¶
type Control ¶
type Control struct { Conf config.Options Logger lw.Logger Service vocab.Actor Storage st.FullStorage }
func (*Control) DeleteClient ¶
func (*Control) DeleteObjects ¶
func (*Control) GenAuthToken ¶
Click to show internal directories.
Click to hide internal directories.