Documentation
¶
Index ¶
- Constants
- func Config(path string) (chan bool, *server.Hertz)
- func Currency(ctx *svc.ServiceContext)
- func Device(ctx *svc.ServiceContext)
- func Email(ctx *svc.ServiceContext)
- func HandleDatabaseTest(_ context.Context, ctx *app.RequestContext)
- func HandleMySQLTest(ctx context.Context, requestCtx *app.RequestContext)
- func HandleRedisTest(_ context.Context, ctx *app.RequestContext)
- func Invite(ctx *svc.ServiceContext)
- func Migrate(ctx *svc.ServiceContext)
- func Mobile(ctx *svc.ServiceContext)
- func Node(ctx *svc.ServiceContext)
- func NodeSecret(svcCtx *svc.ServiceContext)
- func Register(ctx *svc.ServiceContext)
- func Site(ctx *svc.ServiceContext)
- func StartInitSystemConfig(svc *svc.ServiceContext)
- func Subscribe(svc *svc.ServiceContext)
- func Telegram(svc *svc.ServiceContext)
- func Verify(svc *svc.ServiceContext)
Constants ¶
const LegacyDefaultNodeSecret = "12345678"
LegacyDefaultNodeSecret is the node secret the original seed data shipped. The value is public knowledge, so an installation still carrying it serves the node API — which hands out every user's subscription uuid — to anyone.
Variables ¶
This section is empty.
Functions ¶
func Currency ¶ added in v1.2.5
func Currency(ctx *svc.ServiceContext)
func Device ¶ added in v1.1.8
func Device(ctx *svc.ServiceContext)
func HandleDatabaseTest ¶ added in v1.2.12
func HandleDatabaseTest(_ context.Context, ctx *app.RequestContext)
func HandleMySQLTest ¶
func HandleMySQLTest(ctx context.Context, requestCtx *app.RequestContext)
func HandleRedisTest ¶
func HandleRedisTest(_ context.Context, ctx *app.RequestContext)
func Invite ¶
func Invite(ctx *svc.ServiceContext)
func Migrate ¶
func Migrate(ctx *svc.ServiceContext)
func Mobile ¶
func Mobile(ctx *svc.ServiceContext)
func Node ¶
func Node(ctx *svc.ServiceContext)
func NodeSecret ¶ added in v1.16.0
func NodeSecret(svcCtx *svc.ServiceContext)
NodeSecret provisions a random node secret when the database does not carry one yet, so a fresh installation never serves the node API with a guessable credential. It has to run after Migrate, which seeds the empty row, and before Node, which copies the value into the runtime config.
An installation still holding LegacyDefaultNodeSecret is only reported, never rotated: every node was configured with that secret, so rotating it here would silently cut them off. The operator rotates it from the admin panel and reconfigures the nodes in the same window.
func Register ¶
func Register(ctx *svc.ServiceContext)
func Site ¶
func Site(ctx *svc.ServiceContext)
func StartInitSystemConfig ¶
func StartInitSystemConfig(svc *svc.ServiceContext)
func Subscribe ¶
func Subscribe(svc *svc.ServiceContext)
func Telegram ¶
func Telegram(svc *svc.ServiceContext)
Telegram (re)initialises the bot from the stored configuration. On failure it returns without touching the running state, so a transient error during re-initialisation leaves the previous bot working instead of none at all.
func Verify ¶
func Verify(svc *svc.ServiceContext)
Types ¶
This section is empty.