mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-11 18:17:29 -06:00
Generate VAPID key pair during startup
This commit is contained in:
parent
7a02a19c3c
commit
821c1da688
4 changed files with 59 additions and 25 deletions
|
|
@ -68,9 +68,13 @@ type Admin interface {
|
|||
// the number of pending sign-ups sitting in the backlog.
|
||||
CountUnhandledSignups(ctx context.Context) (int, error)
|
||||
|
||||
// GetOrCreateVAPIDKeyPair creates and stores a VAPID key pair,
|
||||
// or retrieves the existing VAPID key pair.
|
||||
GetOrCreateVAPIDKeyPair(ctx context.Context) (*gtsmodel.VAPIDKeyPair, error)
|
||||
// GetVAPIDKeyPair retrieves the existing VAPID key pair, if there is one.
|
||||
// If there isn't, it returns nil.
|
||||
GetVAPIDKeyPair(ctx context.Context) (*gtsmodel.VAPIDKeyPair, error)
|
||||
|
||||
// PutVAPIDKeyPair stores a VAPID key pair.
|
||||
// This should be called at most once, during server startup.
|
||||
PutVAPIDKeyPair(ctx context.Context, vapidKeyPair *gtsmodel.VAPIDKeyPair) error
|
||||
|
||||
/*
|
||||
ACTION FUNCS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue