accesscontrol

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 55

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMember        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMember          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMember = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPolicy        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPolicy          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPolicy = fmt.Errorf("proto: unexpected end of group")
)
View Source
var MemberStatus_name = map[int32]string{
	0: "NORMAL",
	1: "INVALID",
	2: "REVOKED",
	3: "FROZEN",
}
View Source
var MemberStatus_value = map[string]int32{
	"NORMAL":  0,
	"INVALID": 1,
	"REVOKED": 2,
	"FROZEN":  3,
}
View Source
var MemberType_name = map[int32]string{
	0: "CERT",
	1: "CERT_HASH",
	2: "PUBLIC_KEY",
	3: "DID",
	4: "ALIAS",
	5: "ADDR",
}
View Source
var MemberType_value = map[string]int32{
	"CERT":       0,
	"CERT_HASH":  1,
	"PUBLIC_KEY": 2,
	"DID":        3,
	"ALIAS":      4,
	"ADDR":       5,
}
View Source
var VerifyType_name = map[int32]string{
	0: "CRL",
}
View Source
var VerifyType_value = map[string]int32{
	"CRL": 0,
}

Functions

This section is empty.

Types

type Member

type Member struct {
	// organization identifier of the member
	OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	// member type
	MemberType MemberType `protobuf:"varint,2,opt,name=member_type,json=memberType,proto3,enum=accesscontrol.MemberType" json:"member_type,omitempty"`
	// member identity related info bytes
	MemberInfo []byte `protobuf:"bytes,3,opt,name=member_info,json=memberInfo,proto3" json:"member_info,omitempty"`
}

online member of blockchain

func (*Member) ChangeToMemberFull

func (m *Member) ChangeToMemberFull() *MemberFull

func (*Member) Descriptor

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

func (*Member) GetMemberInfo

func (m *Member) GetMemberInfo() []byte

func (*Member) GetMemberType

func (m *Member) GetMemberType() MemberType

func (*Member) GetOrgId

func (m *Member) GetOrgId() string

func (*Member) Marshal

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

func (*Member) MarshalTo

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

func (*Member) MarshalToSizedBuffer

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

func (*Member) ProtoMessage

func (*Member) ProtoMessage()

func (*Member) Reset

func (m *Member) Reset()

func (*Member) Size

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

func (*Member) String

func (m *Member) String() string

func (*Member) Unmarshal

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

func (*Member) XXX_DiscardUnknown

func (m *Member) XXX_DiscardUnknown()

func (*Member) XXX_Marshal

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

func (*Member) XXX_Merge

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

func (*Member) XXX_Size

func (m *Member) XXX_Size() int

func (*Member) XXX_Unmarshal

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

type MemberAndExtraData

type MemberAndExtraData struct {
	Member    *Member          `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"`
	ExtraData *MemberExtraData `protobuf:"bytes,2,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"`
}

func (*MemberAndExtraData) Descriptor

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

func (*MemberAndExtraData) GetExtraData

func (m *MemberAndExtraData) GetExtraData() *MemberExtraData

func (*MemberAndExtraData) GetMember

func (m *MemberAndExtraData) GetMember() *Member

func (*MemberAndExtraData) Marshal

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

func (*MemberAndExtraData) MarshalTo

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

func (*MemberAndExtraData) MarshalToSizedBuffer

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

func (*MemberAndExtraData) ProtoMessage

func (*MemberAndExtraData) ProtoMessage()

func (*MemberAndExtraData) Reset

func (m *MemberAndExtraData) Reset()

func (*MemberAndExtraData) Size

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

func (*MemberAndExtraData) String

func (m *MemberAndExtraData) String() string

func (*MemberAndExtraData) Unmarshal

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

func (*MemberAndExtraData) XXX_DiscardUnknown

func (m *MemberAndExtraData) XXX_DiscardUnknown()

func (*MemberAndExtraData) XXX_Marshal

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

func (*MemberAndExtraData) XXX_Merge

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

func (*MemberAndExtraData) XXX_Size

func (m *MemberAndExtraData) XXX_Size() int

func (*MemberAndExtraData) XXX_Unmarshal

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

type MemberExtraData

type MemberExtraData struct {
	// sequence, like ethereum account nonce, by default is 0
	Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
}

member extra data

func (*MemberExtraData) Descriptor

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

func (*MemberExtraData) GetSequence

func (m *MemberExtraData) GetSequence() uint64

func (*MemberExtraData) Marshal

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

func (*MemberExtraData) MarshalTo

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

func (*MemberExtraData) MarshalToSizedBuffer

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

func (*MemberExtraData) ProtoMessage

func (*MemberExtraData) ProtoMessage()

func (*MemberExtraData) Reset

func (m *MemberExtraData) Reset()

func (*MemberExtraData) Size

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

func (*MemberExtraData) String

func (m *MemberExtraData) String() string

func (*MemberExtraData) Unmarshal

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

func (*MemberExtraData) XXX_DiscardUnknown

func (m *MemberExtraData) XXX_DiscardUnknown()

func (*MemberExtraData) XXX_Marshal

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

func (*MemberExtraData) XXX_Merge

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

func (*MemberExtraData) XXX_Size

func (m *MemberExtraData) XXX_Size() int

func (*MemberExtraData) XXX_Unmarshal

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

type MemberFull

type MemberFull struct {
	// organization identifier of the member
	OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	// member type
	MemberType MemberType `protobuf:"varint,2,opt,name=member_type,json=memberType,proto3,enum=accesscontrol.MemberType" json:"member_type,omitempty"`
	// member identity related info bytes
	MemberInfo []byte `protobuf:"bytes,3,opt,name=member_info,json=memberInfo,proto3" json:"member_info,omitempty"`
	// the identity of this member (non-uniqueness)
	MemberId string `protobuf:"bytes,4,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"`
	// role of this member
	Role string `protobuf:"bytes,5,opt,name=role,proto3" json:"role,omitempty"`
	// the identity of this member (unique)
	Uid string `protobuf:"bytes,6,opt,name=uid,proto3" json:"uid,omitempty"`
}

full attribute member of blockchain

func (*MemberFull) ChangeToMember

func (m *MemberFull) ChangeToMember() *Member

func (*MemberFull) Descriptor

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

func (*MemberFull) GetMemberId

func (m *MemberFull) GetMemberId() string

func (*MemberFull) GetMemberInfo

func (m *MemberFull) GetMemberInfo() []byte

func (*MemberFull) GetMemberType

func (m *MemberFull) GetMemberType() MemberType

func (*MemberFull) GetOrgId

func (m *MemberFull) GetOrgId() string

func (*MemberFull) GetRole

func (m *MemberFull) GetRole() string

func (*MemberFull) GetUid

func (m *MemberFull) GetUid() string

func (*MemberFull) Marshal

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

func (*MemberFull) MarshalTo

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

func (*MemberFull) MarshalToSizedBuffer

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

func (*MemberFull) ProtoMessage

func (*MemberFull) ProtoMessage()

func (*MemberFull) Reset

func (m *MemberFull) Reset()

func (*MemberFull) Size

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

func (*MemberFull) String

func (m *MemberFull) String() string

func (*MemberFull) Unmarshal

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

func (*MemberFull) XXX_DiscardUnknown

func (m *MemberFull) XXX_DiscardUnknown()

func (*MemberFull) XXX_Marshal

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

func (*MemberFull) XXX_Merge

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

func (*MemberFull) XXX_Size

func (m *MemberFull) XXX_Size() int

func (*MemberFull) XXX_Unmarshal

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

type MemberStatus

type MemberStatus int32

member status

const (
	//member's status is normal
	MemberStatus_NORMAL MemberStatus = 0
	//member's status is invalid
	MemberStatus_INVALID MemberStatus = 1
	//member's status is revoked
	MemberStatus_REVOKED MemberStatus = 2
	//member's status is frozen
	MemberStatus_FROZEN MemberStatus = 3
)

func (MemberStatus) EnumDescriptor

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

func (MemberStatus) String

func (x MemberStatus) String() string

type MemberType

type MemberType int32
const (
	//X509 cert
	MemberType_CERT MemberType = 0
	//cert hash
	MemberType_CERT_HASH MemberType = 1
	//public key
	MemberType_PUBLIC_KEY MemberType = 2
	//did
	MemberType_DID MemberType = 3
	//alias
	MemberType_ALIAS MemberType = 4
	//address
	MemberType_ADDR MemberType = 5
)

func (MemberType) EnumDescriptor

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

func (MemberType) String

func (x MemberType) String() string

type PKInfo

type PKInfo struct {
	// the der of the public key
	PkBytes []byte `protobuf:"bytes,1,opt,name=pk_bytes,json=pkBytes,proto3" json:"pk_bytes,omitempty"`
	// member role
	Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
	// member's org_id
	OrgId string `protobuf:"bytes,3,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
}

public key member's info

func (*PKInfo) Descriptor

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

func (*PKInfo) GetOrgId

func (m *PKInfo) GetOrgId() string

func (*PKInfo) GetPkBytes

func (m *PKInfo) GetPkBytes() []byte

func (*PKInfo) GetRole

func (m *PKInfo) GetRole() string

func (*PKInfo) Marshal

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

func (*PKInfo) MarshalTo

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

func (*PKInfo) MarshalToSizedBuffer

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

func (*PKInfo) ProtoMessage

func (*PKInfo) ProtoMessage()

func (*PKInfo) Reset

func (m *PKInfo) Reset()

func (*PKInfo) Size

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

func (*PKInfo) String

func (m *PKInfo) String() string

func (*PKInfo) Unmarshal

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

func (*PKInfo) XXX_DiscardUnknown

func (m *PKInfo) XXX_DiscardUnknown()

func (*PKInfo) XXX_Marshal

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

func (*PKInfo) XXX_Merge

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

func (*PKInfo) XXX_Size

func (m *PKInfo) XXX_Size() int

func (*PKInfo) XXX_Unmarshal

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

type Policy

type Policy struct {
	// rule keywords, e.g., ANY/MAJORITY/ALL/SELF/a number/a rate
	Rule string `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"`
	// org_list describes the organization set included in the authentication
	OrgList []string `protobuf:"bytes,2,rep,name=org_list,json=orgList,proto3" json:"org_list,omitempty"`
	// role_list describes the role set included in the authentication
	// e.g., admin/client/consensus/common
	RoleList []string `protobuf:"bytes,3,rep,name=role_list,json=roleList,proto3" json:"role_list,omitempty"`
}

Policy used to describe how to authenticate a specific action

func (*Policy) Descriptor

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

func (*Policy) GetOrgList

func (m *Policy) GetOrgList() []string

func (*Policy) GetRoleList

func (m *Policy) GetRoleList() []string

func (*Policy) GetRule

func (m *Policy) GetRule() string

func (*Policy) Marshal

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

func (*Policy) MarshalTo

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

func (*Policy) MarshalToSizedBuffer

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

func (*Policy) ProtoMessage

func (*Policy) ProtoMessage()

func (*Policy) Reset

func (m *Policy) Reset()

func (*Policy) Size

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

func (*Policy) String

func (m *Policy) String() string

func (*Policy) Unmarshal

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

func (*Policy) XXX_DiscardUnknown

func (m *Policy) XXX_DiscardUnknown()

func (*Policy) XXX_Marshal

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

func (*Policy) XXX_Merge

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

func (*Policy) XXX_Size

func (m *Policy) XXX_Size() int

func (*Policy) XXX_Unmarshal

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

type VerifyType

type VerifyType int32

verify the member's relevant identity material type

const (
	//CRL
	VerifyType_CRL VerifyType = 0
)

func (VerifyType) EnumDescriptor

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

func (VerifyType) String

func (x VerifyType) String() string

Jump to

Keyboard shortcuts

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