grpc

package
v3.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: AGPL-3.0 Imports: 31 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 {
	// contains filtered or unexported fields
}

func (*Handler) CreateVersion

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

func (*Handler) HeadVersion

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

func (*Handler) ListVersions

func (h *Handler) ListVersions(ctx context.Context, request *tree.ListVersionsRequest, versionsStream tree.NodeVersioner_ListVersionsStream) error

func (*Handler) PruneVersions

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

func (*Handler) StoreVersion

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

Jump to

Keyboard shortcuts

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