Skip to content

Commit

Permalink
feat(tar): for do fsys export or import
Browse files Browse the repository at this point in the history
  • Loading branch information
morlay committed Jun 12, 2024
1 parent c4ec41d commit 3a12ddd
Show file tree
Hide file tree
Showing 28 changed files with 1,256 additions and 122 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif
UNIFS = go run ./cmd/unifs

gen:
go run ./tool/internal/cmd/tool gen ./cmd/kubepkg
go run ./internal/cmd/tool gen ./cmd/unifs

ship:
$(PIPER) do ship push
Expand Down
137 changes: 137 additions & 0 deletions cmd/unifs/zz_generated.runtimedoc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
/*
Package main GENERATED BY gengo:runtimedoc
DON'T EDIT THIS FILE
*/
package main

// nolint:deadcode,unused
func runtimeDoc(v any, names ...string) ([]string, bool) {
if c, ok := v.(interface {
RuntimeDoc(names ...string) ([]string, bool)
}); ok {
return c.RuntimeDoc(names...)
}
return nil, false
}

func (v CSIDriver) RuntimeDoc(names ...string) ([]string, bool) {
if len(names) > 0 {
switch names[0] {
case "Otel":
return []string{}, true
case "Driver":
return []string{}, true

}
if doc, ok := runtimeDoc(v.Driver, names...); ok {
return doc, ok
}

return nil, false
}
return []string{
"Serve CSIDriver",
}, true
}

func (v Ftp) RuntimeDoc(names ...string) ([]string, bool) {
if len(names) > 0 {
switch names[0] {
case "Otel":
return []string{}, true
case "FileSystemBackend":
return []string{}, true
case "Server":
return []string{}, true

}
if doc, ok := runtimeDoc(v.FileSystemBackend, names...); ok {
return doc, ok
}
if doc, ok := runtimeDoc(v.Server, names...); ok {
return doc, ok
}

return nil, false
}
return []string{
"Serve Webdav as fuse fs",
}, true
}

func (v Mount) RuntimeDoc(names ...string) ([]string, bool) {
if len(names) > 0 {
switch names[0] {
case "Otel":
return []string{}, true
case "Mounter":
return []string{}, true

}
if doc, ok := runtimeDoc(v.Mounter, names...); ok {
return doc, ok
}

return nil, false
}
return []string{
"Mount as fuse fs",
}, true
}

func (v Mounter) RuntimeDoc(names ...string) ([]string, bool) {
if len(names) > 0 {
switch names[0] {
case "MountPoint":
return []string{}, true
case "Backend":
return []string{}, true
case "Foreground":
return []string{}, true
case "Delegate":
return []string{}, true

}

return nil, false
}
return []string{}, true
}

func (v WebDAV) RuntimeDoc(names ...string) ([]string, bool) {
if len(names) > 0 {
switch names[0] {
case "Otel":
return []string{}, true
case "WebDAVServer":
return []string{}, true

}
if doc, ok := runtimeDoc(v.WebDAVServer, names...); ok {
return doc, ok
}

return nil, false
}
return []string{
"Serve Webdav as fuse fs",
}, true
}

func (v WebDAVServer) RuntimeDoc(names ...string) ([]string, bool) {
if len(names) > 0 {
switch names[0] {
case "Addr":
return []string{}, true
case "FileSystemBackend":
return []string{}, true

}
if doc, ok := runtimeDoc(v.FileSystemBackend, names...); ok {
return doc, ok
}

return nil, false
}
return []string{}, true
}
9 changes: 6 additions & 3 deletions cue.mod/module.cue
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
module: "github.com/octohelm/unifs@v0"
language: {
version: "v0.9.0"
}
deps: {
"github.com/octohelm/kubepkg@v0": {
v: "v0.5.4"
"github.com/octohelm/kubepkgspec@v0": {
v: "v0.0.0-20240521102121-31a405691640"
}
"github.com/octohelm/piper@v0": {
v: "v0.0.0-20240414075629-6284b300365f"
v: "v0.0.0-20240612072825-3e6e200ba813"
}
"piper.octohelm.tech@v0": {
v: "v0.0.0-builtin"
Expand Down
8 changes: 4 additions & 4 deletions cue.mod/module_overwrites.cue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
deps: {
"github.com/octohelm/kubepkg@v0": {
path: "github.com/octohelm/kubepkg"
v: "v0.5.4"
"github.com/octohelm/kubepkgspec@v0": {
path: "github.com/octohelm/kubepkgspec"
v: "v0.0.0-20240521102121-31a405691640"
}
"github.com/octohelm/piper@v0": {
path: "github.com/octohelm/piper"
v: "v0.0.0-20240414075629-6284b300365f"
v: "v0.0.0-20240612072825-3e6e200ba813"
}
}
2 changes: 1 addition & 1 deletion cuepkg/csidriver/c_attacher.cue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package csidriver

import (
kubepkgspec "github.com/octohelm/kubepkg/cuepkg/kubepkg"
kubepkgspec "github.com/octohelm/kubepkgspec/cuepkg/kubepkg"
)

#Attacher: {
Expand Down
2 changes: 1 addition & 1 deletion cuepkg/csidriver/c_driver.cue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package csidriver

import (
kubepkgspec "github.com/octohelm/kubepkg/cuepkg/kubepkg"
kubepkgspec "github.com/octohelm/kubepkgspec/cuepkg/kubepkg"
)

#Driver: {
Expand Down
2 changes: 1 addition & 1 deletion cuepkg/csidriver/c_provisioner.cue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package csidriver

import (
kubepkgspec "github.com/octohelm/kubepkg/cuepkg/kubepkg"
kubepkgspec "github.com/octohelm/kubepkgspec/cuepkg/kubepkg"
)

#Provisioner: {
Expand Down
2 changes: 1 addition & 1 deletion cuepkg/csidriver/entry.cue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package csidriver

import (
kubepkgspec "github.com/octohelm/kubepkg/cuepkg/kubepkg"
kubepkgspec "github.com/octohelm/kubepkgspec/cuepkg/kubepkg"
)

#Provider: {
Expand Down
72 changes: 35 additions & 37 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
module github.com/octohelm/unifs

go 1.22.0

toolchain go1.22.2
go 1.22.4

require (
github.com/container-storage-interface/spec v1.9.0
github.com/fclairamb/ftpserverlib v0.24.0
github.com/fclairamb/ftpserverlib v0.24.1
github.com/go-courier/logr v0.3.0
github.com/golang/protobuf v1.5.4
github.com/hanwen/go-fuse/v2 v2.5.1
github.com/innoai-tech/infra v0.0.0-20240508041032-12069adfe35c
github.com/innoai-tech/infra v0.0.0-20240611091312-17f636378eb9
github.com/jlaffaye/ftp v0.2.0
github.com/johannesboyne/gofakes3 v0.0.0-20230506070712-04da935ef877
github.com/kubernetes-csi/csi-test/v5 v5.0.0
github.com/minio/minio-go/v7 v7.0.70
github.com/minio/minio-go/v7 v7.0.71
github.com/mitchellh/go-ps v1.0.0
github.com/octohelm/gengo v0.0.0-20240510051519-974fb897453b
github.com/octohelm/x v0.0.0-20240513022938-1bd86d96adef
github.com/octohelm/x v0.0.0-20240610081226-97f7761af74c
github.com/pkg/errors v0.9.1
github.com/sevlyar/go-daemon v0.1.6
github.com/spf13/afero v1.11.0
golang.org/x/net v0.25.0
golang.org/x/net v0.26.0
golang.org/x/sync v0.7.0
google.golang.org/grpc v1.64.0
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0
)

require (
cuelang.org/go v0.8.2 // indirect
github.com/aws/aws-sdk-go v1.51.25 // indirect
cuelang.org/go v0.9.0 // indirect
github.com/aws/aws-sdk-go v1.53.20 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/fclairamb/go-log v0.5.0 // indirect
github.com/go-json-experiment/json v0.0.0-20240418180308-af2d5061e6c2 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-json-experiment/json v0.0.0-20240524174822-2d9f40f7385b // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand All @@ -51,42 +49,42 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/onsi/ginkgo/v2 v2.17.2 // indirect
github.com/onsi/gomega v1.33.1 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.53.0 // indirect
github.com/prometheus/procfs v0.15.0 // indirect
github.com/prometheus/common v0.54.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rs/xid v1.5.0 // indirect
github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect
github.com/shabbyrobe/gocovmerge v0.0.0-20190829150210-3e036491d500 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.opentelemetry.io/otel v1.26.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.26.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.48.0 // indirect
go.opentelemetry.io/otel/log v0.2.0-alpha // indirect
go.opentelemetry.io/otel/metric v1.26.0 // indirect
go.opentelemetry.io/otel/sdk v1.26.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.2.0-alpha // indirect
go.opentelemetry.io/otel/sdk/metric v1.26.0 // indirect
go.opentelemetry.io/otel/trace v1.26.0 // indirect
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/tools v0.21.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240515191416-fc5f0ca64291 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect
google.golang.org/protobuf v1.34.1 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect
go.opentelemetry.io/otel/log v0.3.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/sdk v1.27.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.3.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.22.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240610135401-a8a62080eff3 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240610135401-a8a62080eff3 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 3a12ddd

Please sign in to comment.