interfaces

package module
v1.9.1-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

README

NimoOS-Common

Go Reference Go Report Card codecov

Common structs and functions for NimoOS

Documentation

Overview

TODO: 原始 openapi.yaml 来自 NimoTech/IceWhale-OpenAPI(已无法访问),暂时注释,使用已生成的 codegen/mod_management/api.go //go:generate bash -c "mkdir -p codegen/mod_management && go run github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@v2.1.0 -generate types,client -package mod_management https://raw.githubusercontent.com/NimoTech/IceWhale-OpenAPI/refs/heads/main/zimaos-mod-management/mod_management/openapi.yaml > codegen/mod_management/api.go"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MigrationTool

type MigrationTool interface {
	IsMigrationNeeded() (bool, error)
	PreMigrate() error
	Migrate() error
	PostMigrate() error
}

Any logic to migrate data from previous version to current can implement this interface.

The model for migrating from v0.n to v0.m is an execution chain of each version of this migration tool:

START -> migration-tool-v0.n -> migration-tool-v0.n+1 -> ... -> migration-tool-v0.m -> END

Therefore, each migration tool in the chain SHOULD ONLY work on data such as config files and databases. It is responsibility of any install/setup script to control the services because it knows when migration starts and ends.

!!!IMPORTANT!!! DO NOT stop, start, enable or disable services, because the whole execution chain might not have been completed.

Directories

Path Synopsis
codegen
mod_management
Package mod_management provides primitives to interact with the openapi HTTP API.
Package mod_management provides primitives to interact with the openapi HTTP API.
The commmon package provides structs and functions for external code to interact with this gateway service.
The commmon package provides structs and functions for external code to interact with this gateway service.
notify
@Author: LinkLeong link@icewhale.com
@Author: LinkLeong link@icewhale.com
pkg
http
methods in this package automatically include a context with a timeout, in order to solve the problem of hanging requests and to avoid goroutine leaks
methods in this package automatically include a context with a timeout, in order to solve the problem of hanging requests and to avoid goroutine leaks
jwt
ssh

Jump to

Keyboard shortcuts

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