System
package goodmem // import "fury.io/pairsys/goodmem"Server info + system initialization.
Methods are called as client.System().<Method>(ctx, ...) on a *goodmem.Client. Service: SystemService.
Index
type SystemService
type SystemService struct{ … }
Access this service as client.System() on a *goodmem.Client. Its methods follow.
func (s *SystemService) Info
func (s *SystemService) Info(ctx context.Context) (*models.SystemInfoResponse, error)
Returns the server's advertised semantic version, git metadata, build timestamp, and optional capability flags. The endpoint is intentionally unauthenticated so bootstrap tooling can call it before API keys exist.
HTTP — GET /v1/system/info
Parameters
ctx(context.Context) — carries the deadline and cancellation signal for the call.
Returns — (*models.SystemInfoResponse, error)
Example
info, err := client.System().Info(ctx)
if err != nil {
log.Fatal(err)
}
_ = info.Versionfunc (s *SystemService) Init
func (s *SystemService) Init(ctx context.Context) (*models.SystemInitResponse, error)
Initializes the system by creating a root user and API key. This endpoint should only be called once during first-time setup. If the system is already initialized, the endpoint will return a success response without creating new credentials.
HTTP — POST /v1/system/init
Parameters
ctx(context.Context) — carries the deadline and cancellation signal for the call.
Returns — (*models.SystemInitResponse, error)
Example
result, err := client.System().Init(ctx)
if err != nil {
log.Fatal(err)
}
_ = result.AlreadyInitializedtype SystemInfoResponse
type SystemInfoResponse struct{ … }
Version(string, wireversion) — Semantic version string advertised by the running server.Major(int32, wiremajor) — Major version component parsed from the advertised semantic version.Minor(int32, wireminor) — Minor version component parsed from the advertised semantic version.Patch(int32, wirepatch) — Patch version component parsed from the advertised semantic version.Dirty(bool, wiredirty) — Whether the running build reports uncommitted workspace changes.GitCommit(string, optional, wiregitCommit) — Git commit SHA baked into the build, when available.GitDescribe(string, optional, wiregitDescribe) — Git describe output baked into the build, when available.BuildTime(string, optional, wirebuildTime) — Build timestamp recorded for this server binary, when available.Capabilities(map[string]string, optional, wirecapabilities) — Optional capability flags or metadata advertised by the running server.
type SystemInitResponse
type SystemInitResponse struct{ … }
Response from the system initialization endpoint.
AlreadyInitialized(bool, wirealreadyInitialized) — Indicates whether the system was already initialized before this request.Message(string, wiremessage) — A human-readable message about the initialization status.RootAPIKey(string, optional, wirerootApiKey) — The API key for the root user. Only present if system was just initialized (not previously initialized).UserID(string, optional, wireuserId) — The user ID of the root user. Only present if system was just initialized (not previously initialized).