meta

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	Cfg *config.Config
}

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