meta

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package meta serves instance information the web app needs before sign-in: the instance name and logo, which sign-in methods are enabled and the version.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(h huma.API, s *Service)

Register adds GET /api/v1/meta.

Types

type InstanceInfo

type InstanceInfo struct {
	InstanceName  string      `json:"instanceName" example:"Acme ReputeCast"`
	LogoSVG       string      `json:"logoSvg,omitempty"`
	PublicURL     string      `json:"publicUrl" example:"https://reputecast.acme.io"`
	Version       string      `json:"version" example:"v1.4.2"`
	SetupComplete bool        `json:"setupComplete"`
	Password      bool        `json:"password"`
	Passkeys      bool        `json:"passkeys"`
	Social        []string    `json:"social" doc:"Enabled social sign-in providers" enum:"google,microsoft,github"`
	SSO           []SSOOption `json:"sso"`
	// The sign-in page reads in the instance default unless the browser
	// prefers a language ReputeCast has, or the visitor picks one.
	DefaultLanguage     string                   `json:"defaultLanguage,omitempty" example:"en"`
	DefaultRegionFormat string                   `json:"defaultRegionFormat,omitempty" example:"standard"`
	Languages           []applang.LanguageOption `json:"languages,omitempty"`
}

InstanceInfo is the public instance description.

type SSOOption

type SSOOption struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Preset string `json:"preset" enum:"google,entra,okta,keycloak,authentik,oidc"`
	// Domains are the email domains the provider signs in (allowed or enforced).
	Domains []string `json:"domains"`
	// StartURL starts the OIDC flow.
	StartURL string `json:"startUrl"`
}

SSOOption is an enabled SSO provider shown on the sign-in page.

type Service

type Service struct {
	Q *store.Queries
}

Service reads the instance settings.

func (*Service) Get

func (s *Service) Get(ctx context.Context) (InstanceInfo, error)

Get returns the public instance description.

Jump to

Keyboard shortcuts

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