grpc

package
v4.3.1-alpha1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Overview

Package grpc is in charge of storing versions metadata

Index

Constants

This section is empty.

Variables

View Source
var ExposedConfigs = &forms.Form{
	I18NBundle: lang.Bundle(),
	Groups: []*forms.Group{
		{
			Label: "Config.GroupPolicy.Title",
			Fields: []forms.Field{
				&forms.FormField{
					Name: "Uuid",
					Type: forms.ParamHidden,
				},
				&forms.FormField{
					Name:        "Name",
					Label:       "Config.GroupPolicy.Name.Label",
					Type:        forms.ParamString,
					Mandatory:   true,
					Description: "Config.GroupPolicy.Name.Description",
				},
				&forms.FormField{
					Name:        "Description",
					Label:       "Config.GroupPolicy.Description.Label",
					Type:        forms.ParamString,
					Mandatory:   true,
					Description: "Config.GroupPolicy.Description.Description",
				},
				&forms.FormField{
					Name:        "VersionsDataSourceName",
					Label:       "Config.GroupPolicy.VersionsDataSourceName.Label",
					Description: "Config.GroupPolicy.VersionsDataSourceName.Description",
					Type:        forms.ParamSelect,
					Mandatory:   true,
					Default:     "default",
					ChoicePresetList: []map[string]string{
						{"default": "Default (see pydio.json pydio.versions-store configuration)"},
					},
				},
			},
		},
		{
			Label: "Config.GroupSizes.Title",
			Fields: []forms.Field{
				&forms.FormField{
					Name:        "MaxTotalSize",
					Label:       "Config.GroupSizes.MaxTotalSize.Label",
					Description: "Config.GroupSizes.MaxTotalSize.Description",
					Type:        forms.ParamIntegerBytes,
					Mandatory:   false,
					Default:     -1,
				},
				&forms.FormField{
					Name:        "MaxSizePerFile",
					Label:       "Config.GroupSizes.MaxSizePerFile.Label",
					Description: "Config.GroupSizes.MaxSizePerFile.Description",
					Type:        forms.ParamIntegerBytes,
					Mandatory:   false,
					Default:     -1,
				},
				&forms.FormField{
					Name:        "IgnoreFilesGreaterThan",
					Label:       "Config.GroupSizes.IgnoreFilesGreaterThan.Label",
					Description: "Config.GroupSizes.IgnoreFilesGreaterThan.Description",
					Type:        forms.ParamIntegerBytes,
					Mandatory:   false,
					Default:     -1,
				},
			},
		},
		{
			Label: "Config.GroupRetention.Title",
			Fields: []forms.Field{
				&forms.ReplicableFields{
					Id:          "periods",
					Mandatory:   true,
					Title:       "Config.GroupRetention.Title",
					Description: "Config.GroupRetention.Description",
					Fields: []forms.Field{
						&forms.FormField{
							Name:        "IntervalStart",
							Label:       "Config.GroupRetention.IntervalStart.Name",
							Description: "Config.GroupRetention.IntervalStart.Description",
							Type:        forms.ParamString,
							Mandatory:   true,
						},
						&forms.FormField{
							Name:        "MaxNumber",
							Label:       "Config.GroupRetention.MaxNumber.Name",
							Description: "Config.GroupRetention.MaxNumber.Description",
							Type:        forms.ParamInteger,
							Mandatory:   true,
						},
					},
				},
				&forms.FormField{
					Name:        "NodeDeletedStrategy",
					Type:        forms.ParamSelect,
					Label:       "Config.GroupRetention.NodeDeletedStrategy.Name",
					Description: "Config.GroupRetention.NodeDeletedStrategy.Description",
					Default:     "KeepAll",
					Mandatory:   true,
					Editable:    true,
					ChoicePresetList: []map[string]string{
						{tree.VersioningNodeDeletedStrategy_KeepAll.String(): "Config.GroupRetention.NodeDeletedStrategy.KeepAll"},
						{tree.VersioningNodeDeletedStrategy_KeepLast.String(): "Config.GroupRetention.NodeDeletedStrategy.KeepLast"},
						{tree.VersioningNodeDeletedStrategy_KeepNone.String(): "Config.GroupRetention.NodeDeletedStrategy.KeepNone"},
					},
				},
			},
		},
	},
}

Functions

func InitDefaults

func InitDefaults(ctx context.Context) error

func NewChangeLogFromNode

func NewChangeLogFromNode(ctx context.Context, node *tree.Node, event *tree.NodeChangeEvent) *tree.ChangeLog

Types

type Handler

type Handler struct {
	tree.UnimplementedNodeVersionerServer
	// contains filtered or unexported fields
}

func (*Handler) CreateVersion

func (h *Handler) CreateVersion(ctx context.Context, request *tree.CreateVersionRequest) (*tree.CreateVersionResponse, error)

func (*Handler) HeadVersion

func (h *Handler) HeadVersion(ctx context.Context, request *tree.HeadVersionRequest) (*tree.HeadVersionResponse, error)

func (*Handler) ListVersions

func (h *Handler) ListVersions(request *tree.ListVersionsRequest, versionsStream tree.NodeVersioner_ListVersionsServer) error

func (*Handler) Name

func (h *Handler) Name() string

func (*Handler) PruneVersions

func (h *Handler) PruneVersions(ctx context.Context, request *tree.PruneVersionsRequest) (*tree.PruneVersionsResponse, error)

func (*Handler) StoreVersion

func (h *Handler) StoreVersion(ctx context.Context, request *tree.StoreVersionRequest) (*tree.StoreVersionResponse, error)

Jump to

Keyboard shortcuts

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