working commit

This commit is contained in:
2026-02-21 20:07:37 +02:00
parent c6ce50308d
commit 685880c8a8
45 changed files with 255 additions and 453 deletions
+8
View File
@@ -31,3 +31,11 @@ dist_man1_MANS = \
mstorectl-images-info.1 \
mstorectl-images-pull.1 \
mstorectl-images-push.1
man:
$(GO) run makeman-mstorectl.go
$(GO) run makeman-mstored.go
EXTRA_DIST = \
makeman-mstorectl.go \
makeman-mstored.go
+11 -3
View File
@@ -89,7 +89,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = docs
subdir = mans
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -294,6 +294,10 @@ dist_man1_MANS = \
mstorectl-images-pull.1 \
mstorectl-images-push.1
EXTRA_DIST = \
makeman-mstorectl.go \
makeman-mstored.go
all: all-am
.SUFFIXES:
@@ -306,9 +310,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mans/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign docs/Makefile
$(AUTOMAKE) --foreign mans/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -533,6 +537,10 @@ uninstall-man: uninstall-man1
.PRECIOUS: Makefile
man:
$(GO) run makeman-mstorectl.go
$(GO) run makeman-mstored.go
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-168
View File
@@ -1,168 +0,0 @@
package main
//**********************************************************************************************
//github.com/google/go-containerregistry
type IndexManifest struct {
SchemaVersion int64 `json:"schemaVersion"`
MediaType types.MediaType `json:"mediaType,omitempty"`
Manifests []Descriptor `json:"manifests"`
Annotations map[string]string `json:"annotations,omitempty"`
Subject *Descriptor `json:"subject,omitempty"`
}
type Manifest struct {
SchemaVersion int64 `json:"schemaVersion"`
MediaType types.MediaType `json:"mediaType,omitempty"`
Config Descriptor `json:"config"`
Layers []Descriptor `json:"layers"`
Annotations map[string]string `json:"annotations,omitempty"`
Subject *Descriptor `json:"subject,omitempty"`
}
type Descriptor struct {
MediaType types.MediaType `json:"mediaType"`
Size int64 `json:"size"`
Digest Hash `json:"digest"`
Data []byte `json:"data,omitempty"`
URLs []string `json:"urls,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
Platform *Platform `json:"platform,omitempty"`
ArtifactType string `json:"artifactType,omitempty"`
}
//**********************************************************************************************
//github.com/opencontainers/image-spec/specs-go/v1
// application/vnd.oci.image.index.v1+json
type Index struct {
specs.Versioned
// MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json`
MediaType string `json:"mediaType,omitempty"`
// ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact.
ArtifactType string `json:"artifactType,omitempty"`
// Manifests references platform specific manifests.
Manifests []Descriptor `json:"manifests"`
// Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.
Subject *Descriptor `json:"subject,omitempty"`
// Annotations contains arbitrary metadata for the image index.
Annotations map[string]string `json:"annotations,omitempty"`
}
// application/vnd.oci.image.manifest.v1+json
type Manifest struct {
specs.Versioned
// MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`
MediaType string `json:"mediaType,omitempty"`
// ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact.
ArtifactType string `json:"artifactType,omitempty"`
// Config references a configuration object for a container, by digest.
// The referenced configuration object is a JSON blob that the runtime uses to set up the container.
Config Descriptor `json:"config"`
// Layers is an indexed list of layers referenced by the manifest.
Layers []Descriptor `json:"layers"`
// Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.
Subject *Descriptor `json:"subject,omitempty"`
// Annotations contains arbitrary metadata for the image manifest.
Annotations map[string]string `json:"annotations,omitempty"`
}
type Descriptor struct {
// MediaType is the media type of the object this schema refers to.
MediaType string `json:"mediaType"`
// Digest is the digest of the targeted content.
Digest digest.Digest `json:"digest"`
// Size specifies the size in bytes of the blob.
Size int64 `json:"size"`
// URLs specifies a list of URLs from which this object MAY be downloaded
URLs []string `json:"urls,omitempty"`
// Annotations contains arbitrary metadata relating to the targeted content.
Annotations map[string]string `json:"annotations,omitempty"`
// Data is an embedding of the targeted content. This is encoded as a base64
// string when marshalled to JSON (automatically, by encoding/json). If
// present, Data can be used directly to avoid fetching the targeted content.
Data []byte `json:"data,omitempty"`
// Platform describes the platform which the image in the manifest runs on.
// This should only be used when referring to a manifest.
Platform *Platform `json:"platform,omitempty"`
// ArtifactType is the IANA media type of this artifact.
ArtifactType string `json:"artifactType,omitempty"`
}
// *********************************************************************************************
// https://github.com/opencontainers/image-spec/blob/v1.1.1/media-types.md
// application/vnd.oci.image.config.v1+json
// application/vnd.oci.image.config.v1+json
// application/vnd.docker.container.image.v1+json
type Image struct {
// Platform describes the platform which the image in the manifest runs on.
Platform
// Created is the combined date and time at which the image was created, formatted as defined by RFC 3339, section 5.6.
Created *time.Time `json:"created,omitempty"`
// Author defines the name and/or email address of the person or entity which created and is responsible for maintaining the image.
Author string `json:"author,omitempty"`
// Config defines the execution parameters which should be used as a base when running a container using the image.
Config ImageConfig `json:"config,omitempty"`
// RootFS references the layer content addresses used by the image.
RootFS RootFS `json:"rootfs"`
// History describes the history of each layer.
History []History `json:"history,omitempty"`
}
type RootFS struct {
// Type is the type of the rootfs.
Type string `json:"type"`
// DiffIDs is an array of layer content hashes (DiffIDs), in order from bottom-most to top-most.
DiffIDs []digest.Digest `json:"diff_ids"`
}
type ImageConfig struct {
// User defines the username or UID which the process in the container should run as.
User string `json:"User,omitempty"`
// ExposedPorts a set of ports to expose from a container running this image.
ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"`
// Env is a list of environment variables to be used in a container.
Env []string `json:"Env,omitempty"`
// Entrypoint defines a list of arguments to use as the command to execute when the container starts.
Entrypoint []string `json:"Entrypoint,omitempty"`
// Cmd defines the default arguments to the entrypoint of the container.
Cmd []string `json:"Cmd,omitempty"`
// Volumes is a set of directories describing where the process is likely write data specific to a container instance.
Volumes map[string]struct{} `json:"Volumes,omitempty"`
// WorkingDir sets the current working directory of the entrypoint process in the container.
WorkingDir string `json:"WorkingDir,omitempty"`
// Labels contains arbitrary metadata for the container.
Labels map[string]string `json:"Labels,omitempty"`
// StopSignal contains the system call signal that will be sent to the container to exit.
StopSignal string `json:"StopSignal,omitempty"`
// ArgsEscaped
//
// Deprecated: This field is present only for legacy compatibility with
// Docker and should not be used by new image builders. It is used by Docker
// for Windows images to indicate that the `Entrypoint` or `Cmd` or both,
// contains only a single element array, that is a pre-escaped, and combined
// into a single string `CommandLine`. If `true` the value in `Entrypoint` or
// `Cmd` should be used as-is to avoid double escaping.
// https://github.com/opencontainers/image-spec/pull/892
ArgsEscaped bool `json:"ArgsEscaped,omitempty"`
}
// **********************************************************************************************
type Platform struct {
// Architecture field specifies the CPU architecture, for example
// `amd64` or `ppc64le`.
Architecture string `json:"architecture"`
// OS specifies the operating system, for example `linux` or `windows`.
OS string `json:"os"`
// OSVersion is an optional field specifying the operating system
// version, for example on Windows `10.0.14393.1066`.
OSVersion string `json:"os.version,omitempty"`
// OSFeatures is an optional field specifying an array of strings,
// each listing a required OS feature (for example on Windows `win32k`).
OSFeatures []string `json:"os.features,omitempty"`
// Variant is an optional field specifying a variant of the CPU, for
// example `v7` to specify ARMv7 when architecture is `arm`.
Variant string `json:"variant,omitempty"`
}
+1 -1
View File
@@ -22,7 +22,7 @@ func run() error {
cmd := util.GetRooCmd()
now := time.Now()
header := &doc.GenManHeader{
Title: "mstore",
Title: "mstorectl",
Section: "1",
Manual: "User commands",
Source: "mstorectl command",
+48
View File
@@ -0,0 +1,48 @@
package main
import (
"fmt"
"os"
"time"
"github.com/spf13/cobra/doc"
"mstore/cmd/mstored/starter"
)
func run() error {
var err error
os.Args[0] = "mstored"
util := starter.NewStarter()
if err != nil {
return err
}
cmd := util.GetCmd()
now := time.Now()
header := &doc.GenManHeader{
Title: "mstored",
Section: "8",
Manual: "User commands",
Source: "mstored command",
Date: &now,
}
opts := doc.GenManTreeOptions{
Header: header,
Path: "./",
CommandSeparator: "-",
}
err = doc.GenManTreeFromOpts(cmd, opts)
if err != nil {
return err
}
return err
}
func main() {
err := run()
if err != nil {
fmt.Printf("err: %v\n", err)
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-accounts-create - Create user account
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-accounts-delete - Delete account
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-accounts-get - Get account info
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-accounts-list - list accounts
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-accounts-update - Update account parameters
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-accounts - Account operations
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-collections-delete - Delete all files in collection
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-collections-list - List collections in storage
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-collections - Colletion operations
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-files-delete - Delete file in storage
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-files-export - Download file tree to storage as is
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-files-get - Get file from storage
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-files-import - Send file tree to storage as is
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-files-info - Show file information
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-files-list - List files in storage
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-files-put - Put file to storage
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-files - File operations
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-grants-create - Create grant
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-grants-delete - Delete grant
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-grants-get - Get detail grant info
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-grants-list - list user grants
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-grants-update - Update grant parameters
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-grants - Grant operations
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-images-delete - Delete container image from registry
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-images-info - Show container image info
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-images-pull - Pull container image from registry into local file
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-images-push - Push container image from local tar file into registry
+1 -1
View File
@@ -1,5 +1,5 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl-images - Image operations
+3 -3
View File
@@ -1,9 +1,9 @@
.nh
.TH "mstore" "1" "Feb 2026" "mstorectl command" "User commands"
.TH "mstorectl" "1" "Feb 2026" "mstorectl command" "User commands"
.SH NAME
mstorectl -
A brief description the command
Operation with artefacts: files, images, service accounts and grants
.SH SYNOPSIS
@@ -11,7 +11,7 @@ A brief description the command
.SH DESCRIPTION
A brief description the command
Operation with artefacts: files, images, service accounts and grants
.SH OPTIONS
+31
View File
@@ -0,0 +1,31 @@
.nh
.TH "mstored" "8" "Feb 2026" "mstored command" "User commands"
.SH NAME
mstored -
Artifact storage service
.SH SYNOPSIS
\fBmstored [flags]\fP
.SH DESCRIPTION
Artifact storage service
.SH OPTIONS
\fB-D\fP, \fB--asDaemon\fP[=true]
Run service as daemon
.PP
\fB-h\fP, \fB--help\fP[=false]
help for mstored
.PP
\fB-P\fP, \fB--port\fP=1025
Service port
.SH HISTORY
21-Feb-2026 Auto generated by spf13/cobra