version

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register()

Register registers the version module.

Modals and Result:

  • Version, VersionRsp

Routes:

  • GET /api/version

Types

type Version

type Version struct {
	model.Empty
}

Version represents the backend version information for frontend update detection

func (Version) Design

func (Version) Design()

Design defines the API routes for version checking

type VersionModule

type VersionModule struct{}

func (*VersionModule) Param

func (*VersionModule) Param() string

func (*VersionModule) Pub

func (*VersionModule) Pub() bool

func (*VersionModule) Route

func (*VersionModule) Route() string

func (*VersionModule) Service

type VersionRsp

type VersionRsp struct {
	Version     string `json:"version"`     // Backend version string (semantic version)
	BuildTime   int64  `json:"build_time"`  // Build timestamp (Unix timestamp)
	GitCommit   string `json:"git_commit"`  // Git commit hash (short hash)
	GitBranch   string `json:"git_branch"`  // Git branch name
	GoVersion   string `json:"go_version"`  // Go compiler version
	Environment string `json:"environment"` // Environment (dev/staging/prod)
	Uptime      int64  `json:"uptime"`      // Server uptime in seconds
	Timestamp   int64  `json:"timestamp"`   // Current server timestamp
}

VersionRsp contains version information returned to frontend

type VersionService

type VersionService struct {
	service.Base[*Version, *Version, *VersionRsp]
}

func (*VersionService) List

func (l *VersionService) List(ctx *types.ServiceContext, req *Version) (rsp *VersionRsp, err error)

List returns version information including build details and runtime info

Jump to

Keyboard shortcuts

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