Merge pull request #83 from opencloud-eu/rebrand-pkg

Rebrand pkg
This commit is contained in:
Ralf Haferkamp
2025-01-20 10:22:37 +01:00
committed by GitHub
15 changed files with 40 additions and 40 deletions

View File

@@ -1,4 +1,4 @@
// Package backup contains ocis backup functionality.
// Package backup contains OpenCloud backup functionality.
package backup
import (

View File

@@ -4,7 +4,7 @@ import (
"errors"
"fmt"
ocisbs "github.com/cs3org/reva/v2/pkg/storage/fs/ocis/blobstore"
ocbs "github.com/cs3org/reva/v2/pkg/storage/fs/ocis/blobstore"
s3bs "github.com/cs3org/reva/v2/pkg/storage/fs/s3ng/blobstore"
"github.com/opencloud-eu/opencloud/opencloud/pkg/backup"
"github.com/opencloud-eu/opencloud/opencloud/pkg/register"
@@ -18,7 +18,7 @@ import (
func BackupCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "backup",
Usage: "ocis backup functionality",
Usage: "OpenCloud backup functionality",
Subcommands: []*cli.Command{
ConsistencyCommand(cfg),
},
@@ -41,7 +41,7 @@ func ConsistencyCommand(cfg *config.Config) *cli.Command {
&cli.StringFlag{
Name: "basepath",
Aliases: []string{"p"},
Usage: "the basepath of the decomposedfs (e.g. /var/tmp/ocis/storage/users)",
Usage: "the basepath of the decomposedfs (e.g. /var/tmp/opencloud/storage/users)",
Required: true,
},
&cli.StringFlag{
@@ -77,7 +77,7 @@ func ConsistencyCommand(cfg *config.Config) *cli.Command {
s3bs.Options{},
)
case "ocis":
bs, err = ocisbs.New(basePath)
bs, err = ocbs.New(basePath)
case "none":
bs = nil
default:

View File

@@ -91,7 +91,7 @@ func BenchmarkClientCommand(cfg *config.Config) *cli.Command {
// other flags
&cli.StringFlag{
Name: "bearer-token-command",
Usage: "Command to execute for a bearer token, e.g. 'oidc-token OCIS'. When set, disables basic auth.",
Usage: "Command to execute for a bearer token, e.g. 'oidc-token opencloud'. When set, disables basic auth.",
},
&cli.IntFlag{
Name: "every",
@@ -299,7 +299,7 @@ func BenchmarkSyscallsCommand(cfg *config.Config) *cli.Command {
path := c.String("path")
if path == "" {
f, err := os.CreateTemp("", "ocis-bench-temp-")
f, err := os.CreateTemp("", "opencloud-bench-temp-")
if err != nil {
log.Fatal(err)
}

View File

@@ -64,7 +64,7 @@ func checkCmd(cfg *config.Config) *cli.Command {
},
&cli.BoolFlag{
Name: "repair",
Usage: "Try to repair nodes with incorrect treesize metadata. IMPORTANT: Only use this while ownCloud Infinite Scale is not running.",
Usage: "Try to repair nodes with incorrect treesize metadata. IMPORTANT: Only use this while OpenCloud is not running.",
},
&cli.BoolFlag{
Name: "force",
@@ -80,7 +80,7 @@ func check(c *cli.Context) error {
repairFlag := c.Bool("repair")
if repairFlag && !c.Bool("force") {
answer := strings.ToLower(stringPrompt("IMPORTANT: Only use '--repair' when ownCloud Infinite Scale is not running. Do you want to continue? [yes | no = default]"))
answer := strings.ToLower(stringPrompt("IMPORTANT: Only use '--repair' when OpenCloud is not running. Do you want to continue? [yes | no = default]"))
if answer != "yes" && answer != "y" {
return nil
}

View File

@@ -7,7 +7,7 @@ import (
"os"
"strings"
ocisinit "github.com/opencloud-eu/opencloud/opencloud/pkg/init"
ocinit "github.com/opencloud-eu/opencloud/opencloud/pkg/init"
"github.com/opencloud-eu/opencloud/opencloud/pkg/register"
"github.com/opencloud-eu/opencloud/pkg/config"
"github.com/opencloud-eu/opencloud/pkg/config/defaults"
@@ -18,13 +18,13 @@ import (
func InitCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "init",
Usage: "initialise an ocis config",
Usage: "initialise an OpenCloud config",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "insecure",
EnvVars: []string{"OC_INSECURE"},
Value: "ask",
Usage: "Allow insecure oCIS config",
Usage: "Allow insecure OpenCloud config",
},
&cli.BoolFlag{
Name: "diff",
@@ -42,7 +42,7 @@ func InitCommand(cfg *config.Config) *cli.Command {
&cli.StringFlag{
Name: "config-path",
Value: defaults.BaseConfigPath(),
Usage: "Config path for the ocis runtime",
Usage: "Config path for the OpenCloud runtime",
EnvVars: []string{"OC_CONFIG_DIR", "OC_BASE_DATA_PATH"},
},
&cli.StringFlag{
@@ -56,14 +56,14 @@ func InitCommand(cfg *config.Config) *cli.Command {
insecureFlag := c.String("insecure")
insecure := false
if insecureFlag == "ask" {
answer := strings.ToLower(stringPrompt("Do you want to configure Infinite Scale with certificate checking disabled?\n This is not recommended for public instances! [yes | no = default]"))
answer := strings.ToLower(stringPrompt("Do you want to configure OpenCloud with certificate checking disabled?\n This is not recommended for public instances! [yes | no = default]"))
if answer == "yes" || answer == "y" {
insecure = true
}
} else if insecureFlag == strings.ToLower("true") || insecureFlag == strings.ToLower("yes") || insecureFlag == strings.ToLower("y") {
insecure = true
}
err := ocisinit.CreateConfig(insecure, c.Bool("force-overwrite"), c.Bool("diff"), c.String("config-path"), c.String("admin-password"))
err := ocinit.CreateConfig(insecure, c.Bool("force-overwrite"), c.Bool("diff"), c.String("config-path"), c.String("admin-password"))
if err != nil {
log.Fatalf("Could not create config: %s", err)
}

View File

@@ -15,7 +15,7 @@ import (
func ListCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "list",
Usage: "list oCIS services running in the runtime (supervised mode)",
Usage: "list OpenCloud services running in the runtime (supervised mode)",
Category: "runtime",
Flags: []cli.Flag{
&cli.StringFlag{

View File

@@ -6,7 +6,7 @@ import (
"path/filepath"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
ocisbs "github.com/cs3org/reva/v2/pkg/storage/fs/ocis/blobstore"
ocbs "github.com/cs3org/reva/v2/pkg/storage/fs/ocis/blobstore"
"github.com/cs3org/reva/v2/pkg/storage/fs/posix/lookup"
s3bs "github.com/cs3org/reva/v2/pkg/storage/fs/s3ng/blobstore"
"github.com/cs3org/reva/v2/pkg/storagespace"
@@ -27,7 +27,7 @@ var (
func RevisionsCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "revisions",
Usage: "ocis revisions functionality",
Usage: "OpenCloud revisions functionality",
Subcommands: []*cli.Command{
PurgeRevisionsCommand(cfg),
},
@@ -50,7 +50,7 @@ func PurgeRevisionsCommand(cfg *config.Config) *cli.Command {
&cli.StringFlag{
Name: "basepath",
Aliases: []string{"p"},
Usage: "the basepath of the decomposedfs (e.g. /var/tmp/ocis/storage/metadata)",
Usage: "the basepath of the decomposedfs (e.g. /var/tmp/opencloud/storage/metadata)",
Required: true,
},
&cli.StringFlag{
@@ -103,7 +103,7 @@ func PurgeRevisionsCommand(cfg *config.Config) *cli.Command {
s3bs.Options{},
)
case "ocis":
bs, err = ocisbs.New(basePath)
bs, err = ocbs.New(basePath)
case "none":
bs = nil
default:

View File

@@ -12,7 +12,7 @@ import (
"github.com/urfave/cli/v2"
)
// Execute is the entry point for the ocis command.
// Execute is the entry point for the opencloud command.
func Execute() error {
cfg := config.DefaultConfig()

View File

@@ -15,7 +15,7 @@ import (
func TrashCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "trash",
Usage: "ocis trash functionality",
Usage: "OpenCloud trash functionality",
Subcommands: []*cli.Command{
TrashPurgeEmptyDirsCommand(cfg),
},
@@ -37,7 +37,7 @@ func TrashPurgeEmptyDirsCommand(cfg *config.Config) *cli.Command {
&cli.StringFlag{
Name: "basepath",
Aliases: []string{"p"},
Usage: "the basepath of the decomposedfs (e.g. /var/tmp/ocis/storage/users)",
Usage: "the basepath of the decomposedfs (e.g. /var/tmp/opencloud/storage/users)",
Required: true,
},
&cli.BoolFlag{

View File

@@ -1,6 +1,6 @@
# ownCloud Infinite Scale: Runtime
# OpenCloud: Runtime
Pman is a slim utility library for supervising long-running processes. It can be [embedded](https://github.com/owncloud/OCIS/blob/ea2a2b328e7261ed72e65adf48359c0a44e14b40/OCIS/pkg/runtime/runtime.go#L84) or used as a cli command.
Pman is a slim utility library for supervising long-running processes. It can be embedded or used as a cli command.
When used as a CLI command it relays actions to a running runtime.
@@ -10,7 +10,7 @@ Start a runtime
```go
package main
import "github.com/owncloud/ocis/ocis/pkg/runtime/service"
import "github.com/opencloude-eu/opencloud/opencloud/pkg/runtime/service"
func main() {
service.Start()
@@ -28,8 +28,8 @@ package main
import (
"fmt"
"github.com/owncloud/ocis/ocis/pkg/runtime/process"
"github.com/owncloud/ocis/ocis/pkg/runtime/service"
"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/process"
"github.com/opencloud-eu/opencloud/opencloud/pkg/runtime/service"
"github.com/rs/zerolog/log"
"os"
"os/signal"
@@ -65,4 +65,4 @@ func main() {
}
```
Run the example above with `RUNTIME_KEEP_ALIVE=true` and with no `RUNTIME_KEEP_ALIVE` set to see its behavior. It requires an [oCIS binary](https://github.com/owncloud/ocis/releases) present in your `$PATH` for it to work.
Run the example above with `RUNTIME_KEEP_ALIVE=true` and with no `RUNTIME_KEEP_ALIVE` set to see its behavior. It requires an [OpenCloud binary](https://github.com/opencloud-eu/opencloud/releases) present in your `$PATH` for it to work.

View File

@@ -7,12 +7,12 @@ import (
"github.com/opencloud-eu/opencloud/pkg/config"
)
// Runtime represents an oCIS runtime environment.
// Runtime represents an OpenCloud runtime environment.
type Runtime struct {
c *config.Config
}
// New creates a new oCIS + micro runtime
// New creates a new OpenCloud + micro runtime
func New(cfg *config.Config) Runtime {
return Runtime{
c: cfg,

View File

@@ -93,7 +93,7 @@ type Service struct {
// When used as a library, flags are not parsed, and in order to avoid introducing a global state with init functions
// calls are done explicitly to loadFromEnv().
// Since this is the public constructor, options need to be added, at the moment only logging options
// are supported in order to match the running OwnCloud services structured log.
// are supported in order to match the running OpenCloud services structured log.
func NewService(ctx context.Context, options ...Option) (*Service, error) {
opts := NewOptions()
@@ -349,9 +349,9 @@ func NewService(ctx context.Context, options ...Option) (*Service, error) {
}
// Start a rpc service. By default, the package scope Start will run all default services to provide with a working
// oCIS instance.
// OpenCloud instance.
func Start(ctx context.Context, o ...Option) error {
// Start the runtime. Most likely this was called ONLY by the `ocis server` subcommand, but since we cannot protect
// Start the runtime. Most likely this was called ONLY by the `opencloud server` subcommand, but since we cannot protect
// from the caller, the previous statement holds truth.
// prepare a new rpc Service struct.
@@ -367,7 +367,7 @@ func Start(ctx context.Context, o ...Option) error {
tolerance := 5
totalBackoff := 0
// Start creates its own supervisor. Running services under `ocis server` will create its own supervision tree.
// Start creates its own supervisor. Running services under `opencloud server` will create its own supervision tree.
s.Supervisor = suture.New("opencloud", suture.Spec{
EventHook: func(e suture.Event) {
if e.Type() == suture.EventTypeBackoff {

View File

@@ -13,8 +13,8 @@ func DefaultApp(app *cli.App) *cli.App {
// author info
app.Authors = []*cli.Author{
{
Name: "ownCloud GmbH",
Email: "support@owncloud.com",
Name: "OpenCloud GmbH",
Email: "support@opencloud.eu",
},
}

View File

@@ -10,7 +10,7 @@ nested structs, but it will not allocate new pointers to structs.
## API
Full API docs are available on
[godoc.org](https://godoc.org/github.com/owncloud/ocis/ocis-pkg/config/envdecode).
[godoc.org](https://godoc.org/github.com/opencloud-eu/opencloud/pkg/config/envdecode).
Define a struct with `env` struct tags:

View File

@@ -23,10 +23,10 @@ var (
//Date = time.Now().Format("20060102")
Date = "dev"
// Legacy defines the old long 4 number ownCloud version needed for some clients
// Legacy defines the old long 4 number OpenCloud version needed for some clients
Legacy = "10.11.0.0"
// LegacyString defines the old ownCloud version needed for some clients
// LegacyString defines the old OpenCloud version needed for some clients
LegacyString = "10.11.0"
)