Documentation
¶
Overview ¶
Package user handles user registration.
Index ¶
- func Create(ctx context.Context, domain string, db *sql.DB, cfg *cfg.Config, name string, ...) (*ap.Actor, [2]httpsig.Key, error)
- func CreateApplicationActor(ctx context.Context, domain string, db *sql.DB, cfg *cfg.Config) (*ap.Actor, [2]httpsig.Key, error)
- func CreatePortable(ctx context.Context, domain string, db *sql.DB, cfg *cfg.Config, name string, ...) (*ap.Actor, [2]httpsig.Key, error)
- func CreatePortableWithKey(ctx context.Context, domain string, db *sql.DB, cfg *cfg.Config, name string, ...) (*ap.Actor, [2]httpsig.Key, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(ctx context.Context, domain string, db *sql.DB, cfg *cfg.Config, name string, cert *x509.Certificate) (*ap.Actor, [2]httpsig.Key, error)
Create creates a new user.
Before v0.21.0, tootik offered users choice between 'traditional' and 'portable' accounts, and this function exists only because it's used by tests, to test backward compatibility with older tootik versions and interoperability with ActivityPub servers that don't support https://codeberg.org/fediverse/fep/src/branch/main/fep/ef61/fep-ef61.md.
func CreateApplicationActor ¶ added in v0.21.0
func CreateApplicationActor(ctx context.Context, domain string, db *sql.DB, cfg *cfg.Config) (*ap.Actor, [2]httpsig.Key, error)
CreateApplicationActor creates the special "actor" user. This user is used to sign outgoing requests not initiated by a particular user.
func CreatePortable ¶ added in v0.19.0
func CreatePortable( ctx context.Context, domain string, db *sql.DB, cfg *cfg.Config, name string, actorType ap.ActorType, cert *x509.Certificate, ) (*ap.Actor, [2]httpsig.Key, error)
CreatePortable creates a new portable user.
func CreatePortableWithKey ¶ added in v0.21.0
func CreatePortableWithKey( ctx context.Context, domain string, db *sql.DB, cfg *cfg.Config, name string, actorType ap.ActorType, cert *x509.Certificate, ed25519Priv ed25519.PrivateKey, ed25519Pub ed25519.PublicKey, ) (*ap.Actor, [2]httpsig.Key, error)
CreatePortableWithKey creates a new portable user using a given key.
Types ¶
This section is empty.