Move api-v2 files into v2 subdir

This subdir contains generated proto files
and small wrappers.
This commit is contained in:
Alex Vanin 2020-08-13 15:43:47 +03:00 committed by Stanislav Bogatyrev
parent 0ee1c3653d
commit 1f143e54bd
48 changed files with 1479 additions and 1515 deletions

View file

@ -1,89 +0,0 @@
package v2
import (
refs "github.com/nspcc-dev/neofs-api-go/refs/v2"
)
// SetContainerId sets container identifier of the eACL table.
func (m *EACLTable) SetContainerId(v *refs.ContainerID) {
if m != nil {
m.ContainerId = v
}
}
// SetRecords sets record list of the eACL table.
func (m *EACLTable) SetRecords(v []*EACLRecord) {
if m != nil {
m.Records = v
}
}
// SetOperation sets operation of the eACL record.
func (m *EACLRecord) SetOperation(v EACLRecord_Operation) {
if m != nil {
m.Operation = v
}
}
// SetAction sets action of the eACL record.
func (m *EACLRecord) SetAction(v EACLRecord_Action) {
if m != nil {
m.Action = v
}
}
// SetFilters sets filter list of the eACL record.
func (m *EACLRecord) SetFilters(v []*EACLRecord_FilterInfo) {
if m != nil {
m.Filters = v
}
}
// SetTargets sets target list of the eACL record.
func (m *EACLRecord) SetTargets(v []*EACLRecord_TargetInfo) {
if m != nil {
m.Targets = v
}
}
// SetHeader sets header type of the eACL filter.
func (m *EACLRecord_FilterInfo) SetHeader(v EACLRecord_FilterInfo_Header) {
if m != nil {
m.Header = v
}
}
// SetMatchType sets match type of the eACL filter.
func (m *EACLRecord_FilterInfo) SetMatchType(v EACLRecord_FilterInfo_MatchType) {
if m != nil {
m.MatchType = v
}
}
// SetHeaderName sets header name of the eACL filter.
func (m *EACLRecord_FilterInfo) SetHeaderName(v string) {
if m != nil {
m.HeaderName = v
}
}
// SetHeaderVal sets header value of the eACL filter.
func (m *EACLRecord_FilterInfo) SetHeaderVal(v string) {
if m != nil {
m.HeaderVal = v
}
}
// SetTarget sets target group of the eACL target.
func (m *EACLRecord_TargetInfo) SetTarget(v Target) {
if m != nil {
m.Target = v
}
}
// SetKeyList sets key list of the eACL target.
func (m *EACLRecord_TargetInfo) SetKeyList(v [][]byte) {
if m != nil {
m.KeyList = v
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,106 +0,0 @@
syntax = "proto3";
package acl.v2;
option go_package = "github.com/nspcc-dev/neofs-api-go/acl/v2";
option csharp_namespace = "NeoFS.API.Acl";
import "refs/v2/types.proto";
// Target of the access control rule in access control list.
enum Target {
// Unknown target, default value.
UNKNOWN = 0;
// User target rule is applied if sender is the owner of the container.v2.
USER = 1;
// System target rule is applied if sender is the storage node within the
// container or inner ring node.
SYSTEM = 2;
// Others target rule is applied if sender is not user or system target.
OTHERS = 3;
}
// EACLRecord groups information about extended ACL rule.
message EACLRecord {
// Operation is an enumeration of operation types.
enum Operation {
OPERATION_UNKNOWN = 0;
GET = 1;
HEAD = 2;
PUT = 3;
DELETE = 4;
SEARCH = 5;
GETRANGE = 6;
GETRANGEHASH = 7;
}
// Operation carries type of operation.
Operation operation = 1 [json_name = "Operation"];
// Action is an enumeration of EACL actions.
enum Action {
ACTION_UNKNOWN = 0;
ALLOW = 1;
DENY = 2;
}
// Action carries ACL target action.
Action action = 2 [json_name = "Action"];
// FilterInfo groups information about filter.
message FilterInfo {
// Header is an enumeration of filtering header types.
enum Header {
HEADER_UNKNOWN = 0;
REQUEST = 1;
OBJECT = 2;
}
// Header carries type of header.
Header header = 1 [json_name = "HeaderType"];
// MatchType is an enumeration of match types.
enum MatchType {
MATCH_UNKNOWN = 0;
STRING_EQUAL = 1;
STRING_NOT_EQUAL = 2;
}
// MatchType carries type of match.
MatchType match_type = 2 [json_name = "MatchType"];
// header_name carries name of filtering header.
string header_name = 3 [json_name="Name"];
// header_val carries value of filtering header.
string header_val = 4 [json_name="Value"];
}
// filters carries set of filters.
repeated FilterInfo filters = 3 [json_name="Filters"];
// TargetInfo groups information about extended ACL target.
message TargetInfo {
// target carries target of ACL rule.
acl.v2.Target target = 1 [json_name="Role"];
// key_list carries public keys of ACL target.
repeated bytes key_list = 2 [json_name="Keys"];
}
// targets carries information about extended ACL target list.
repeated TargetInfo targets = 4 [json_name="Targets"];
}
// EACLRecord carries the information about extended ACL rules.
message EACLTable {
// Carries identifier of the container that should use given
// access control rules.
refs.v2.ContainerID container_id = 1 [json_name="ContainerID"];
// Records carries list of extended ACL rule records.
repeated EACLRecord records = 2 [json_name="Records"];
}