info

package
v0.0.0-...-0119d12 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRouter

func RegisterRouter(r *gin.RouterGroup, auth *user.AuthService, s *Service)

Types

type InfoResponse

type InfoResponse struct {
	Version            *version.Info  `json:"version"`
	EnableTelemetry    bool           `json:"enable_telemetry"`
	EnableExperimental bool           `json:"enable_experimental"`
	SupportedFeatures  []string       `json:"supported_features"`
	NgmState           utils.NgmState `json:"ngm_state"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(lc fx.Lifecycle, p ServiceParams) *Service

func (*Service) WhoamiHandler

func (s *Service) WhoamiHandler(c *gin.Context)

@ID infoWhoami @Summary Get information about current session @Success 200 {object} WhoAmIResponse @Router /info/whoami [get] @Security JwtAuth @Failure 401 {object} rest.ErrorResponse

type ServiceParams

type ServiceParams struct {
	fx.In
	EtcdClient   *clientv3.Client
	Config       *config.Config
	LocalStore   *dbstore.DB
	TiDBClient   *tidb.Client
	FeatureFlags *featureflag.Registry
}

type WhoAmIResponse

type WhoAmIResponse struct {
	DisplayName string `json:"display_name"`
	IsShareable bool   `json:"is_shareable"`
	IsWriteable bool   `json:"is_writeable"`
}

Jump to

Keyboard shortcuts

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