acl

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HdrObjSysNameID is a name of ID field in system header of object.
	HdrObjSysNameID = "ID"

	// HdrObjSysNameCID is a name of CID field in system header of object.
	HdrObjSysNameCID = "CID"

	// HdrObjSysNameOwnerID is a name of OwnerID field in system header of object.
	HdrObjSysNameOwnerID = "OWNER_ID"

	// HdrObjSysNameVersion is a name of Version field in system header of object.
	HdrObjSysNameVersion = "VERSION"

	// HdrObjSysNamePayloadLength is a name of PayloadLength field in system header of object.
	HdrObjSysNamePayloadLength = "PAYLOAD_LENGTH"

	// HdrObjSysNameCreatedUnix is a name of CreatedAt.UnitTime field in system header of object.
	HdrObjSysNameCreatedUnix = "CREATED_UNIX"

	// HdrObjSysNameCreatedEpoch is a name of CreatedAt.Epoch field in system header of object.
	HdrObjSysNameCreatedEpoch = "CREATED_EPOCH"

	// HdrObjSysLinkPrev is a name of previous link header in extended headers of object.
	HdrObjSysLinkPrev = "LINK_PREV"

	// HdrObjSysLinkNext is a name of next link header in extended headers of object.
	HdrObjSysLinkNext = "LINK_NEXT"

	// HdrObjSysLinkChild is a name of child link header in extended headers of object.
	HdrObjSysLinkChild = "LINK_CHILD"

	// HdrObjSysLinkPar is a name of parent link header in extended headers of object.
	HdrObjSysLinkPar = "LINK_PAR"

	// HdrObjSysLinkSG is a name of storage group link header in extended headers of object.
	HdrObjSysLinkSG = "LINK_SG"
)

Variables

View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var EACLRecord_Action_name = map[int32]string{
	0: "ActionUnknown",
	1: "Allow",
	2: "Deny",
}
View Source
var EACLRecord_Action_value = map[string]int32{
	"ActionUnknown": 0,
	"Allow":         1,
	"Deny":          2,
}
View Source
var EACLRecord_FilterInfo_Header_name = map[int32]string{
	0: "HeaderUnknown",
	1: "Request",
	2: "ObjectSystem",
	3: "ObjectUser",
}
View Source
var EACLRecord_FilterInfo_Header_value = map[string]int32{
	"HeaderUnknown": 0,
	"Request":       1,
	"ObjectSystem":  2,
	"ObjectUser":    3,
}
View Source
var EACLRecord_FilterInfo_MatchType_name = map[int32]string{
	0: "MatchUnknown",
	1: "StringEqual",
	2: "StringNotEqual",
}
View Source
var EACLRecord_FilterInfo_MatchType_value = map[string]int32{
	"MatchUnknown":   0,
	"StringEqual":    1,
	"StringNotEqual": 2,
}
View Source
var EACLRecord_Operation_name = map[int32]string{
	0: "OPERATION_UNKNOWN",
	1: "GET",
	2: "HEAD",
	3: "PUT",
	4: "DELETE",
	5: "SEARCH",
	6: "GETRANGE",
	7: "GETRANGEHASH",
}
View Source
var EACLRecord_Operation_value = map[string]int32{
	"OPERATION_UNKNOWN": 0,
	"GET":               1,
	"HEAD":              2,
	"PUT":               3,
	"DELETE":            4,
	"SEARCH":            5,
	"GETRANGE":          6,
	"GETRANGEHASH":      7,
}
View Source
var Target_name = map[int32]string{
	0: "Unknown",
	1: "User",
	2: "System",
	3: "Others",
	4: "PubKey",
}
View Source
var Target_value = map[string]int32{
	"Unknown": 0,
	"User":    1,
	"System":  2,
	"Others":  3,
	"PubKey":  4,
}

Functions

This section is empty.

Types

type EACLFilterWrapper added in v1.2.0

type EACLFilterWrapper struct {
	// contains filtered or unexported fields
}

EACLFilterWrapper is a wrapper over EACLRecord_FilterInfo pointer.

func WrapFilterInfo added in v1.2.0

func WrapFilterInfo(v *EACLRecord_FilterInfo) EACLFilterWrapper

WrapFilterInfo wraps EACLRecord_FilterInfo pointer.

If argument is nil, new EACLRecord_FilterInfo is initialized.

func (EACLFilterWrapper) HeaderType added in v1.2.0

func (s EACLFilterWrapper) HeaderType() (res HeaderType)

HeaderType returns the result of Header field getter.

If filter is not initialized, 0 returns.

Returns 0 if Header is not one of:

  • EACLRecord_FilterInfo_Request;
  • EACLRecord_FilterInfo_ObjectSystem;
  • EACLRecord_FilterInfo_ObjectUser.

func (EACLFilterWrapper) MatchType added in v1.2.0

func (s EACLFilterWrapper) MatchType() (res MatchType)

MatchType returns casted result of MatchType field getter.

If filter is not initialized, 0 returns.

Returns 0 if MatchType is not one of:

  • EACLRecord_FilterInfo_StringEqual;
  • EACLRecord_FilterInfo_StringNotEqual.

func (EACLFilterWrapper) Name added in v1.2.0

func (s EACLFilterWrapper) Name() string

Name returns the result of HeaderName field getter.

If filter is not initialized, empty string returns.

func (EACLFilterWrapper) SetHeaderType added in v1.2.0

func (s EACLFilterWrapper) SetHeaderType(t HeaderType)

SetHeaderType passes casted argument to Header field setter.

If filter is not initialized, nothing changes.

Header is set to EACLRecord_FilterInfo_HeaderUnknown if argument is not one of:

  • HdrTypeRequest;
  • HdrTypeObjSys;
  • HdrTypeObjUsr.

func (EACLFilterWrapper) SetMatchType added in v1.2.0

func (s EACLFilterWrapper) SetMatchType(v MatchType)

SetMatchType passes casted argument to MatchType field setter.

If filter is not initialized, nothing changes.

MatchType is set to EACLRecord_FilterInfo_MatchUnknown if argument is not one of:

  • StringEqual;
  • StringNotEqual.

func (EACLFilterWrapper) SetName added in v1.2.0

func (s EACLFilterWrapper) SetName(v string)

SetName passes argument to HeaderName field setter.

If filter is not initialized, nothing changes.

func (EACLFilterWrapper) SetValue added in v1.2.0

func (s EACLFilterWrapper) SetValue(v string)

SetValue passes argument to HeaderVal field setter.

If filter is not initialized, nothing changes.

func (EACLFilterWrapper) Value added in v1.2.0

func (s EACLFilterWrapper) Value() string

Value returns the result of HeaderVal field getter.

If filter is not initialized, empty string returns.

type EACLRecord added in v1.2.0

type EACLRecord struct {
	// Operation carries type of operation.
	Operation EACLRecord_Operation `protobuf:"varint,1,opt,name=operation,json=Operation,proto3,enum=acl.EACLRecord_Operation" json:"operation,omitempty"`
	// Action carries ACL target action.
	Action EACLRecord_Action `protobuf:"varint,2,opt,name=action,json=Action,proto3,enum=acl.EACLRecord_Action" json:"action,omitempty"`
	// Filters carries set of filters.
	Filters []*EACLRecord_FilterInfo `protobuf:"bytes,3,rep,name=Filters,proto3" json:"Filters,omitempty"`
	// Targets carries information about extended ACL target list.
	Targets              []*EACLRecord_TargetInfo `protobuf:"bytes,4,rep,name=Targets,proto3" json:"Targets,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

EACLRecord groups information about extended ACL rule.

func (*EACLRecord) Descriptor added in v1.2.0

func (*EACLRecord) Descriptor() ([]byte, []int)

func (*EACLRecord) GetAction added in v1.2.0

func (m *EACLRecord) GetAction() EACLRecord_Action

func (*EACLRecord) GetFilters added in v1.2.0

func (m *EACLRecord) GetFilters() []*EACLRecord_FilterInfo

func (*EACLRecord) GetOperation added in v1.2.0

func (m *EACLRecord) GetOperation() EACLRecord_Operation

func (*EACLRecord) GetTargets added in v1.2.0

func (m *EACLRecord) GetTargets() []*EACLRecord_TargetInfo

func (*EACLRecord) Marshal added in v1.2.0

func (m *EACLRecord) Marshal() (dAtA []byte, err error)

func (*EACLRecord) MarshalTo added in v1.2.0

func (m *EACLRecord) MarshalTo(dAtA []byte) (int, error)

func (*EACLRecord) MarshalToSizedBuffer added in v1.2.0

func (m *EACLRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EACLRecord) ProtoMessage added in v1.2.0

func (*EACLRecord) ProtoMessage()

func (*EACLRecord) Reset added in v1.2.0

func (m *EACLRecord) Reset()

func (*EACLRecord) SetAction added in v1.2.0

func (m *EACLRecord) SetAction(v EACLRecord_Action)

SetAction is an Action field setter.

func (*EACLRecord) SetFilters added in v1.2.0

func (m *EACLRecord) SetFilters(v []*EACLRecord_FilterInfo)

SetFilters is a Filters field setter.

func (*EACLRecord) SetOperation added in v1.2.0

func (m *EACLRecord) SetOperation(v EACLRecord_Operation)

SetOperation is an Operation field setter.

func (*EACLRecord) SetTargets added in v1.2.0

func (m *EACLRecord) SetTargets(v []*EACLRecord_TargetInfo)

SetTargets is a Targets field setter.

func (*EACLRecord) Size added in v1.2.0

func (m *EACLRecord) Size() (n int)

func (*EACLRecord) String added in v1.2.0

func (m *EACLRecord) String() string

func (*EACLRecord) Unmarshal added in v1.2.0

func (m *EACLRecord) Unmarshal(dAtA []byte) error

func (*EACLRecord) XXX_DiscardUnknown added in v1.2.0

func (m *EACLRecord) XXX_DiscardUnknown()

func (*EACLRecord) XXX_Marshal added in v1.2.0

func (m *EACLRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EACLRecord) XXX_Merge added in v1.2.0

func (m *EACLRecord) XXX_Merge(src proto.Message)

func (*EACLRecord) XXX_Size added in v1.2.0

func (m *EACLRecord) XXX_Size() int

func (*EACLRecord) XXX_Unmarshal added in v1.2.0

func (m *EACLRecord) XXX_Unmarshal(b []byte) error

type EACLRecordWrapper added in v1.2.0

type EACLRecordWrapper struct {
	// contains filtered or unexported fields
}

EACLRecordWrapper is a wrapper over EACLRecord pointer.

func WrapEACLRecord added in v1.2.0

func WrapEACLRecord(v *EACLRecord) EACLRecordWrapper

WrapEACLRecord wraps EACLRecord pointer.

If argument is nil, new EACLRecord is initialized.

func (EACLRecordWrapper) Action added in v1.2.0

func (s EACLRecordWrapper) Action() (res ExtendedACLAction)

Action returns casted result of Action field getter.

If record is not initialized, 0 returns.

Returns 0 if Action is not one of:

  • EACLRecord_Deny;
  • EACLRecord_Allow.

func (EACLRecordWrapper) HeaderFilters added in v1.2.0

func (s EACLRecordWrapper) HeaderFilters() []HeaderFilter

HeaderFilters wraps all elements from Filters field getter result and returns HeaderFilter list.

If record is not initialized, nil returns.

func (EACLRecordWrapper) OperationType added in v1.2.0

func (s EACLRecordWrapper) OperationType() (res OperationType)

OperationType returns casted result of Operation field getter.

If record is not initialized, 0 returns.

Returns 0 if Operation is not one of:

  • EACLRecord_HEAD;
  • EACLRecord_PUT;
  • EACLRecord_SEARCH;
  • EACLRecord_GET;
  • EACLRecord_GETRANGE;
  • EACLRecord_GETRANGEHASH;
  • EACLRecord_DELETE.

func (EACLRecordWrapper) SetAction added in v1.2.0

func (s EACLRecordWrapper) SetAction(v ExtendedACLAction)

SetAction passes casted argument to Action field setter.

If record is not initialized, nothing changes.

Action is set to EACLRecord_ActionUnknown if argument is not one of:

  • ActionDeny;
  • ActionAllow.

func (EACLRecordWrapper) SetHeaderFilters added in v1.2.0

func (s EACLRecordWrapper) SetHeaderFilters(v []HeaderFilter)

SetHeaderFilters converts HeaderFilter list to EACLRecord_FilterInfo list and passes it to Filters field setter.

Ignores nil elements of argument. If record is not initialized, nothing changes.

func (EACLRecordWrapper) SetOperationType added in v1.2.0

func (s EACLRecordWrapper) SetOperationType(v OperationType)

SetOperationType passes casted argument to Operation field setter.

If record is not initialized, nothing changes.

Operation is set to EACLRecord_OPERATION_UNKNOWN if argument is not one of:

  • OpTypeHead;
  • OpTypePut;
  • OpTypeSearch;
  • OpTypeGet;
  • OpTypeRange;
  • OpTypeRangeHash;
  • OpTypeDelete.

func (EACLRecordWrapper) SetTargetList added in v1.2.0

func (s EACLRecordWrapper) SetTargetList(v []ExtendedACLTarget)

SetTargetList converts ExtendedACLTarget list to EACLRecord_TargetInfo list and passes it to Targets field setter.

Ignores nil elements of argument. If record is not initialized, nothing changes.

func (EACLRecordWrapper) TargetList added in v1.2.0

func (s EACLRecordWrapper) TargetList() []ExtendedACLTarget

TargetList wraps all elements from Targets field getter result and returns ExtendedACLTarget list.

If record is not initialized, nil returns.

type EACLRecord_Action added in v1.2.0

type EACLRecord_Action int32

Action is an enumeration of EACL actions.

const (
	EACLRecord_ActionUnknown EACLRecord_Action = 0
	EACLRecord_Allow         EACLRecord_Action = 1
	EACLRecord_Deny          EACLRecord_Action = 2
)

func (EACLRecord_Action) EnumDescriptor added in v1.2.0

func (EACLRecord_Action) EnumDescriptor() ([]byte, []int)

func (EACLRecord_Action) String added in v1.2.0

func (x EACLRecord_Action) String() string

type EACLRecord_FilterInfo added in v1.2.0

type EACLRecord_FilterInfo struct {
	// Header carries type of header.
	Header EACLRecord_FilterInfo_Header `protobuf:"varint,1,opt,name=header,json=HeaderType,proto3,enum=acl.EACLRecord_FilterInfo_Header" json:"header,omitempty"`
	// MatchType carries type of match.
	MatchType EACLRecord_FilterInfo_MatchType `` /* 128-byte string literal not displayed */
	// HeaderName carries name of filtering header.
	HeaderName string `protobuf:"bytes,3,opt,name=HeaderName,json=Name,proto3" json:"HeaderName,omitempty"`
	// HeaderVal carries value of filtering header.
	HeaderVal            string   `protobuf:"bytes,4,opt,name=HeaderVal,json=Value,proto3" json:"HeaderVal,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

FilterInfo groups information about filter.

func (*EACLRecord_FilterInfo) Descriptor added in v1.2.0

func (*EACLRecord_FilterInfo) Descriptor() ([]byte, []int)

func (*EACLRecord_FilterInfo) GetHeader added in v1.2.0

func (*EACLRecord_FilterInfo) GetHeaderName added in v1.2.0

func (m *EACLRecord_FilterInfo) GetHeaderName() string

func (*EACLRecord_FilterInfo) GetHeaderVal added in v1.2.0

func (m *EACLRecord_FilterInfo) GetHeaderVal() string

func (*EACLRecord_FilterInfo) GetMatchType added in v1.2.0

func (*EACLRecord_FilterInfo) Marshal added in v1.2.0

func (m *EACLRecord_FilterInfo) Marshal() (dAtA []byte, err error)

func (*EACLRecord_FilterInfo) MarshalTo added in v1.2.0

func (m *EACLRecord_FilterInfo) MarshalTo(dAtA []byte) (int, error)

func (*EACLRecord_FilterInfo) MarshalToSizedBuffer added in v1.2.0

func (m *EACLRecord_FilterInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EACLRecord_FilterInfo) ProtoMessage added in v1.2.0

func (*EACLRecord_FilterInfo) ProtoMessage()

func (*EACLRecord_FilterInfo) Reset added in v1.2.0

func (m *EACLRecord_FilterInfo) Reset()

func (*EACLRecord_FilterInfo) SetHeader added in v1.2.0

SetHeader is a Header field setter.

func (*EACLRecord_FilterInfo) SetHeaderName added in v1.2.0

func (m *EACLRecord_FilterInfo) SetHeaderName(v string)

SetHeaderName is a HeaderName field setter.

func (*EACLRecord_FilterInfo) SetHeaderVal added in v1.2.0

func (m *EACLRecord_FilterInfo) SetHeaderVal(v string)

SetHeaderVal is a HeaderVal field setter.

func (*EACLRecord_FilterInfo) SetMatchType added in v1.2.0

SetMatchType is MatchType field setter.

func (*EACLRecord_FilterInfo) Size added in v1.2.0

func (m *EACLRecord_FilterInfo) Size() (n int)

func (*EACLRecord_FilterInfo) String added in v1.2.0

func (m *EACLRecord_FilterInfo) String() string

func (*EACLRecord_FilterInfo) Unmarshal added in v1.2.0

func (m *EACLRecord_FilterInfo) Unmarshal(dAtA []byte) error

func (*EACLRecord_FilterInfo) XXX_DiscardUnknown added in v1.2.0

func (m *EACLRecord_FilterInfo) XXX_DiscardUnknown()

func (*EACLRecord_FilterInfo) XXX_Marshal added in v1.2.0

func (m *EACLRecord_FilterInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EACLRecord_FilterInfo) XXX_Merge added in v1.2.0

func (m *EACLRecord_FilterInfo) XXX_Merge(src proto.Message)

func (*EACLRecord_FilterInfo) XXX_Size added in v1.2.0

func (m *EACLRecord_FilterInfo) XXX_Size() int

func (*EACLRecord_FilterInfo) XXX_Unmarshal added in v1.2.0

func (m *EACLRecord_FilterInfo) XXX_Unmarshal(b []byte) error

type EACLRecord_FilterInfo_Header added in v1.2.0

type EACLRecord_FilterInfo_Header int32

Header is an enumeration of filtering header types.

const (
	EACLRecord_FilterInfo_HeaderUnknown EACLRecord_FilterInfo_Header = 0
	EACLRecord_FilterInfo_Request       EACLRecord_FilterInfo_Header = 1
	EACLRecord_FilterInfo_ObjectSystem  EACLRecord_FilterInfo_Header = 2
	EACLRecord_FilterInfo_ObjectUser    EACLRecord_FilterInfo_Header = 3
)

func (EACLRecord_FilterInfo_Header) EnumDescriptor added in v1.2.0

func (EACLRecord_FilterInfo_Header) EnumDescriptor() ([]byte, []int)

func (EACLRecord_FilterInfo_Header) String added in v1.2.0

type EACLRecord_FilterInfo_MatchType added in v1.2.0

type EACLRecord_FilterInfo_MatchType int32

MatchType is an enumeration of match types.

const (
	EACLRecord_FilterInfo_MatchUnknown   EACLRecord_FilterInfo_MatchType = 0
	EACLRecord_FilterInfo_StringEqual    EACLRecord_FilterInfo_MatchType = 1
	EACLRecord_FilterInfo_StringNotEqual EACLRecord_FilterInfo_MatchType = 2
)

func (EACLRecord_FilterInfo_MatchType) EnumDescriptor added in v1.2.0

func (EACLRecord_FilterInfo_MatchType) EnumDescriptor() ([]byte, []int)

func (EACLRecord_FilterInfo_MatchType) String added in v1.2.0

type EACLRecord_Operation added in v1.2.0

type EACLRecord_Operation int32

Operation is an enumeration of operation types.

const (
	EACLRecord_OPERATION_UNKNOWN EACLRecord_Operation = 0
	EACLRecord_GET               EACLRecord_Operation = 1
	EACLRecord_HEAD              EACLRecord_Operation = 2
	EACLRecord_PUT               EACLRecord_Operation = 3
	EACLRecord_DELETE            EACLRecord_Operation = 4
	EACLRecord_SEARCH            EACLRecord_Operation = 5
	EACLRecord_GETRANGE          EACLRecord_Operation = 6
	EACLRecord_GETRANGEHASH      EACLRecord_Operation = 7
)

func (EACLRecord_Operation) EnumDescriptor added in v1.2.0

func (EACLRecord_Operation) EnumDescriptor() ([]byte, []int)

func (EACLRecord_Operation) String added in v1.2.0

func (x EACLRecord_Operation) String() string

type EACLRecord_TargetInfo added in v1.2.0

type EACLRecord_TargetInfo struct {
	// Target carries target of ACL rule.
	Target Target `protobuf:"varint,1,opt,name=Target,json=Role,proto3,enum=acl.Target" json:"Target,omitempty"`
	// KeyList carries public keys of ACL target.
	KeyList              [][]byte `protobuf:"bytes,2,rep,name=KeyList,json=Keys,proto3" json:"KeyList,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TargetInfo groups information about extended ACL target.

func (*EACLRecord_TargetInfo) Descriptor added in v1.2.0

func (*EACLRecord_TargetInfo) Descriptor() ([]byte, []int)

func (*EACLRecord_TargetInfo) GetKeyList added in v1.2.0

func (m *EACLRecord_TargetInfo) GetKeyList() [][]byte

func (*EACLRecord_TargetInfo) GetTarget added in v1.2.0

func (m *EACLRecord_TargetInfo) GetTarget() Target

func (*EACLRecord_TargetInfo) Marshal added in v1.2.0

func (m *EACLRecord_TargetInfo) Marshal() (dAtA []byte, err error)

func (*EACLRecord_TargetInfo) MarshalTo added in v1.2.0

func (m *EACLRecord_TargetInfo) MarshalTo(dAtA []byte) (int, error)

func (*EACLRecord_TargetInfo) MarshalToSizedBuffer added in v1.2.0

func (m *EACLRecord_TargetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EACLRecord_TargetInfo) ProtoMessage added in v1.2.0

func (*EACLRecord_TargetInfo) ProtoMessage()

func (*EACLRecord_TargetInfo) Reset added in v1.2.0

func (m *EACLRecord_TargetInfo) Reset()

func (*EACLRecord_TargetInfo) SetKeyList added in v1.2.0

func (m *EACLRecord_TargetInfo) SetKeyList(v [][]byte)

SetKeyList is a KeyList field setter.

func (*EACLRecord_TargetInfo) SetTarget added in v1.2.0

func (m *EACLRecord_TargetInfo) SetTarget(v Target)

SetTarget is a Target field setter.

func (*EACLRecord_TargetInfo) Size added in v1.2.0

func (m *EACLRecord_TargetInfo) Size() (n int)

func (*EACLRecord_TargetInfo) String added in v1.2.0

func (m *EACLRecord_TargetInfo) String() string

func (*EACLRecord_TargetInfo) Unmarshal added in v1.2.0

func (m *EACLRecord_TargetInfo) Unmarshal(dAtA []byte) error

func (*EACLRecord_TargetInfo) XXX_DiscardUnknown added in v1.2.0

func (m *EACLRecord_TargetInfo) XXX_DiscardUnknown()

func (*EACLRecord_TargetInfo) XXX_Marshal added in v1.2.0

func (m *EACLRecord_TargetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EACLRecord_TargetInfo) XXX_Merge added in v1.2.0

func (m *EACLRecord_TargetInfo) XXX_Merge(src proto.Message)

func (*EACLRecord_TargetInfo) XXX_Size added in v1.2.0

func (m *EACLRecord_TargetInfo) XXX_Size() int

func (*EACLRecord_TargetInfo) XXX_Unmarshal added in v1.2.0

func (m *EACLRecord_TargetInfo) XXX_Unmarshal(b []byte) error

type EACLTable added in v1.2.0

type EACLTable struct {
	// Records carries list of extended ACL rule records.
	Records              []*EACLRecord `protobuf:"bytes,1,rep,name=Records,proto3" json:"Records,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

EACLRecord carries the information about extended ACL rules.

func (*EACLTable) Descriptor added in v1.2.0

func (*EACLTable) Descriptor() ([]byte, []int)

func (*EACLTable) GetRecords added in v1.2.0

func (m *EACLTable) GetRecords() []*EACLRecord

func (*EACLTable) Marshal added in v1.2.0

func (m *EACLTable) Marshal() (dAtA []byte, err error)

func (*EACLTable) MarshalTo added in v1.2.0

func (m *EACLTable) MarshalTo(dAtA []byte) (int, error)

func (*EACLTable) MarshalToSizedBuffer added in v1.2.0

func (m *EACLTable) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EACLTable) ProtoMessage added in v1.2.0

func (*EACLTable) ProtoMessage()

func (*EACLTable) Reset added in v1.2.0

func (m *EACLTable) Reset()

func (*EACLTable) SetRecords added in v1.2.0

func (m *EACLTable) SetRecords(v []*EACLRecord)

SetRecords is a Records field setter.

func (*EACLTable) Size added in v1.2.0

func (m *EACLTable) Size() (n int)

func (*EACLTable) String added in v1.2.0

func (m *EACLTable) String() string

func (*EACLTable) Unmarshal added in v1.2.0

func (m *EACLTable) Unmarshal(dAtA []byte) error

func (*EACLTable) XXX_DiscardUnknown added in v1.2.0

func (m *EACLTable) XXX_DiscardUnknown()

func (*EACLTable) XXX_Marshal added in v1.2.0

func (m *EACLTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EACLTable) XXX_Merge added in v1.2.0

func (m *EACLTable) XXX_Merge(src proto.Message)

func (*EACLTable) XXX_Size added in v1.2.0

func (m *EACLTable) XXX_Size() int

func (*EACLTable) XXX_Unmarshal added in v1.2.0

func (m *EACLTable) XXX_Unmarshal(b []byte) error

type EACLTableWrapper added in v1.2.0

type EACLTableWrapper struct {
	// contains filtered or unexported fields
}

EACLTableWrapper is a wrapper over EACLTable pointer.

func WrapEACLTable added in v1.2.0

func WrapEACLTable(v *EACLTable) EACLTableWrapper

WrapEACLTable wraps EACLTable pointer.

If argument is nil, new EACLTable is initialized.

func (EACLTableWrapper) MarshalBinary added in v1.2.0

func (s EACLTableWrapper) MarshalBinary() ([]byte, error)

MarshalBinary returns the result of Marshal method.

func (EACLTableWrapper) Records added in v1.2.0

func (s EACLTableWrapper) Records() []ExtendedACLRecord

Records wraps all elements from Records field getter result and returns ExtendedACLRecord list.

If table is not initialized, nil returns.

func (EACLTableWrapper) SetRecords added in v1.2.0

func (s EACLTableWrapper) SetRecords(v []ExtendedACLRecord)

SetRecords converts ExtendedACLRecord list to EACLRecord list and passes it to Records field setter.

Ignores nil elements of argument. If table is not initialized, nothing changes.

func (EACLTableWrapper) UnmarshalBinary added in v1.2.0

func (s EACLTableWrapper) UnmarshalBinary(data []byte) error

UnmarshalBinary passes argument to Unmarshal method and returns its result.

type EACLTargetWrapper added in v1.2.0

type EACLTargetWrapper struct {
	// contains filtered or unexported fields
}

EACLTargetWrapper is a wrapper over EACLRecord_TargetInfo pointer.

func WrapEACLTarget added in v1.2.0

func WrapEACLTarget(v *EACLRecord_TargetInfo) EACLTargetWrapper

WrapEACLTarget wraps EACLRecord_TargetInfo pointer.

If argument is nil, new EACLRecord_TargetInfo is initialized.

func (EACLTargetWrapper) KeyList added in v1.2.0

func (s EACLTargetWrapper) KeyList() [][]byte

KeyList returns the result of KeyList field getter.

If target is not initialized, nil returns.

func (EACLTargetWrapper) SetKeyList added in v1.2.0

func (s EACLTargetWrapper) SetKeyList(v [][]byte)

SetKeyList passes argument to KeyList field setter.

If target is not initialized, nothing changes.

func (EACLTargetWrapper) SetTarget added in v1.2.0

func (s EACLTargetWrapper) SetTarget(v Target)

SetTarget passes argument to Target field setter.

If target is not initialized, nothing changes.

func (EACLTargetWrapper) Target added in v1.2.0

func (s EACLTargetWrapper) Target() Target

Target returns the result of Target field getter.

If target is not initialized, Target_Unknown returns.

type ExtendedACLAction added in v1.2.0

type ExtendedACLAction uint32

ExtendedACLAction is an enumeration of extended ACL actions.

const (
	// ActionUndefined is ExtendedACLAction used to mark value as undefined.
	// Most of the tools consider ActionUndefined as incalculable.
	// Using ActionUndefined in ExtendedACLRecord is unsafe.
	ActionUndefined ExtendedACLAction = iota

	// ActionAllow is ExtendedACLAction used to mark an applicability of ACL rule.
	ActionAllow

	// ActionDeny is ExtendedACLAction used to mark an inapplicability of ACL rule.
	ActionDeny
)

type ExtendedACLRecord added in v1.2.0

type ExtendedACLRecord interface {
	// Must return operation type of extended ACL rule.
	OperationType() OperationType

	// Must return list of header filters of extended ACL rule.
	HeaderFilters() []HeaderFilter

	// Must return target list of extended ACL rule.
	TargetList() []ExtendedACLTarget

	// Must return action of extended ACL rule.
	Action() ExtendedACLAction
}

ExtendedACLRecord is an interface of record of extended ACL rule table.

type ExtendedACLTable added in v1.2.0

type ExtendedACLTable interface {
	// Must return list of extended ACL rules.
	Records() []ExtendedACLRecord
}

ExtendedACLTable is an interface of extended ACL table.

type ExtendedACLTarget added in v1.2.0

type ExtendedACLTarget interface {
	// Must return ACL target type.
	Target() Target

	// Must return public key list of ACL targets.
	KeyList() [][]byte
}

ExtendedACLTarget is an interface of grouped information about extended ACL rule target.

type Header interface {
	// Must return string identifier of header.
	Name() string

	// Must return string value of header.
	Value() string
}

Header is an interface of string key-value pair,

type HeaderFilter added in v1.2.0

type HeaderFilter interface {
	// Must return match type of filter.
	MatchType() MatchType

	TypedHeader
}

HeaderFilter is an interface of grouped information about filtered header.

type HeaderType added in v1.2.0

type HeaderType uint32

HeaderType is an enumeration of header types for extended ACL.

const (

	// HdrTypeRequest is a HeaderType for request header.
	HdrTypeRequest HeaderType

	// HdrTypeObjSys is a HeaderType for system headers of object.
	HdrTypeObjSys

	// HdrTypeObjUsr is a HeaderType for user headers of object.
	HdrTypeObjUsr
)

type MatchType added in v1.2.0

type MatchType uint32

MatchType is an enumeration of match types for extended ACL.

const (

	// StringEqual is a MatchType of string equality.
	StringEqual MatchType

	// StringNotEqual is a MatchType of string inequality.
	StringNotEqual
)

type OperationType added in v1.2.0

type OperationType uint32

OperationType is an enumeration of operation types for extended ACL.

const (

	// OpTypeGet is an OperationType for object.Get RPC
	OpTypeGet OperationType

	// OpTypePut is an OperationType for object.Put RPC
	OpTypePut

	// OpTypeHead is an OperationType for object.Head RPC
	OpTypeHead

	// OpTypeSearch is an OperationType for object.Search RPC
	OpTypeSearch

	// OpTypeDelete is an OperationType for object.Delete RPC
	OpTypeDelete

	// OpTypeRange is an OperationType for object.GetRange RPC
	OpTypeRange

	// OpTypeRangeHash is an OperationType for object.GetRangeHash RPC
	OpTypeRangeHash
)

type Target

type Target int32

Target of the access control rule in access control list.

const (
	// Unknown target, default value.
	Target_Unknown Target = 0
	// User target rule is applied if sender is the owner of the container.
	Target_User Target = 1
	// System target rule is applied if sender is the storage node within the
	// container or inner ring node.
	Target_System Target = 2
	// Others target rule is applied if sender is not user or system target.
	Target_Others Target = 3
	// PubKey target rule is applied if sender has public key provided in
	// extended ACL.
	Target_PubKey Target = 4
)

func (Target) EnumDescriptor

func (Target) EnumDescriptor() ([]byte, []int)

func (Target) String

func (x Target) String() string

type TypedHeader added in v1.2.0

type TypedHeader interface {
	Header

	// Must return type of filtered header.
	HeaderType() HeaderType
}

TypedHeader is an interface of Header and HeaderType pair.

Jump to

Keyboard shortcuts

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