accesscontrol

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 5 Imported by: 40

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthParticipant        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParticipant          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParticipant = 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 ParticipantStatus_name = map[int32]string{
	0: "NORMAL",
	1: "INVALID",
	2: "REVOKED",
	3: "FROZEN",
}
View Source
var ParticipantStatus_value = map[string]int32{
	"NORMAL":  0,
	"INVALID": 1,
	"REVOKED": 2,
	"FROZEN":  3,
}
View Source
var ParticipantType_name = map[int32]string{
	0: "CERT",
	1: "CERT_HASH",
	2: "PUBLIC_KEY",
	3: "DID",
	4: "ALIAS",
	5: "ADDR",
}
View Source
var ParticipantType_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 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"`
	// participant role
	Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
	// participant's org_id
	OrgId string `protobuf:"bytes,3,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
}

public key participant'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 Participant

type Participant struct {
	// organization identifier of the participant
	OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	// participant type
	ParticipantType ParticipantType `` /* 142-byte string literal not displayed */
	// participant identity related info bytes
	ParticipantInfo []byte `protobuf:"bytes,3,opt,name=participant_info,json=participantInfo,proto3" json:"participant_info,omitempty"`
}

online participant of blockchain

func (*Participant) ChangeToParticipantFull

func (m *Participant) ChangeToParticipantFull() *ParticipantFull

func (*Participant) Descriptor

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

func (*Participant) GetOrgId

func (m *Participant) GetOrgId() string

func (*Participant) GetParticipantInfo

func (m *Participant) GetParticipantInfo() []byte

func (*Participant) GetParticipantType

func (m *Participant) GetParticipantType() ParticipantType

func (*Participant) Marshal

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

func (*Participant) MarshalTo

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

func (*Participant) MarshalToSizedBuffer

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

func (*Participant) ProtoMessage

func (*Participant) ProtoMessage()

func (*Participant) Reset

func (m *Participant) Reset()

func (*Participant) Size

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

func (*Participant) String

func (m *Participant) String() string

func (*Participant) Unmarshal

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

func (*Participant) XXX_DiscardUnknown

func (m *Participant) XXX_DiscardUnknown()

func (*Participant) XXX_Marshal

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

func (*Participant) XXX_Merge

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

func (*Participant) XXX_Size

func (m *Participant) XXX_Size() int

func (*Participant) XXX_Unmarshal

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

type ParticipantAndExtraData

type ParticipantAndExtraData struct {
	Participant *Participant          `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
	ExtraData   *ParticipantExtraData `protobuf:"bytes,2,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"`
}

func (*ParticipantAndExtraData) Descriptor

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

func (*ParticipantAndExtraData) GetExtraData

func (m *ParticipantAndExtraData) GetExtraData() *ParticipantExtraData

func (*ParticipantAndExtraData) GetParticipant

func (m *ParticipantAndExtraData) GetParticipant() *Participant

func (*ParticipantAndExtraData) Marshal

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

func (*ParticipantAndExtraData) MarshalTo

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

func (*ParticipantAndExtraData) MarshalToSizedBuffer

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

func (*ParticipantAndExtraData) ProtoMessage

func (*ParticipantAndExtraData) ProtoMessage()

func (*ParticipantAndExtraData) Reset

func (m *ParticipantAndExtraData) Reset()

func (*ParticipantAndExtraData) Size

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

func (*ParticipantAndExtraData) String

func (m *ParticipantAndExtraData) String() string

func (*ParticipantAndExtraData) Unmarshal

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

func (*ParticipantAndExtraData) XXX_DiscardUnknown

func (m *ParticipantAndExtraData) XXX_DiscardUnknown()

func (*ParticipantAndExtraData) XXX_Marshal

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

func (*ParticipantAndExtraData) XXX_Merge

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

func (*ParticipantAndExtraData) XXX_Size

func (m *ParticipantAndExtraData) XXX_Size() int

func (*ParticipantAndExtraData) XXX_Unmarshal

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

type ParticipantExtraData

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

participant extra data

func (*ParticipantExtraData) Descriptor

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

func (*ParticipantExtraData) GetSequence

func (m *ParticipantExtraData) GetSequence() uint64

func (*ParticipantExtraData) Marshal

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

func (*ParticipantExtraData) MarshalTo

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

func (*ParticipantExtraData) MarshalToSizedBuffer

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

func (*ParticipantExtraData) ProtoMessage

func (*ParticipantExtraData) ProtoMessage()

func (*ParticipantExtraData) Reset

func (m *ParticipantExtraData) Reset()

func (*ParticipantExtraData) Size

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

func (*ParticipantExtraData) String

func (m *ParticipantExtraData) String() string

func (*ParticipantExtraData) Unmarshal

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

func (*ParticipantExtraData) XXX_DiscardUnknown

func (m *ParticipantExtraData) XXX_DiscardUnknown()

func (*ParticipantExtraData) XXX_Marshal

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

func (*ParticipantExtraData) XXX_Merge

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

func (*ParticipantExtraData) XXX_Size

func (m *ParticipantExtraData) XXX_Size() int

func (*ParticipantExtraData) XXX_Unmarshal

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

type ParticipantFull

type ParticipantFull struct {
	// organization identifier of the participant
	OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	// participant type
	ParticipantType ParticipantType `` /* 142-byte string literal not displayed */
	// participant identity related info bytes
	ParticipantInfo []byte `protobuf:"bytes,3,opt,name=participant_info,json=participantInfo,proto3" json:"participant_info,omitempty"`
	// the identity of this participant (non-uniqueness)
	ParticipantId string `protobuf:"bytes,4,opt,name=participant_id,json=participantId,proto3" json:"participant_id,omitempty"`
	// role of this participant
	Role string `protobuf:"bytes,5,opt,name=role,proto3" json:"role,omitempty"`
	// the identity of this participant (unique)
	Uid string `protobuf:"bytes,6,opt,name=uid,proto3" json:"uid,omitempty"`
}

full attribute participant of blockchain

func (*ParticipantFull) ChangeToParticipant

func (m *ParticipantFull) ChangeToParticipant() *Participant

func (*ParticipantFull) Descriptor

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

func (*ParticipantFull) GetOrgId

func (m *ParticipantFull) GetOrgId() string

func (*ParticipantFull) GetParticipantId

func (m *ParticipantFull) GetParticipantId() string

func (*ParticipantFull) GetParticipantInfo

func (m *ParticipantFull) GetParticipantInfo() []byte

func (*ParticipantFull) GetParticipantType

func (m *ParticipantFull) GetParticipantType() ParticipantType

func (*ParticipantFull) GetRole

func (m *ParticipantFull) GetRole() string

func (*ParticipantFull) GetUid

func (m *ParticipantFull) GetUid() string

func (*ParticipantFull) Marshal

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

func (*ParticipantFull) MarshalTo

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

func (*ParticipantFull) MarshalToSizedBuffer

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

func (*ParticipantFull) ProtoMessage

func (*ParticipantFull) ProtoMessage()

func (*ParticipantFull) Reset

func (m *ParticipantFull) Reset()

func (*ParticipantFull) Size

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

func (*ParticipantFull) String

func (m *ParticipantFull) String() string

func (*ParticipantFull) Unmarshal

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

func (*ParticipantFull) XXX_DiscardUnknown

func (m *ParticipantFull) XXX_DiscardUnknown()

func (*ParticipantFull) XXX_Marshal

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

func (*ParticipantFull) XXX_Merge

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

func (*ParticipantFull) XXX_Size

func (m *ParticipantFull) XXX_Size() int

func (*ParticipantFull) XXX_Unmarshal

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

type ParticipantStatus

type ParticipantStatus int32

participant status

const (
	//participant's status is normal
	ParticipantStatus_NORMAL ParticipantStatus = 0
	//participant's status is invalid
	ParticipantStatus_INVALID ParticipantStatus = 1
	//participant's status is revoked
	ParticipantStatus_REVOKED ParticipantStatus = 2
	//participant's status is frozen
	ParticipantStatus_FROZEN ParticipantStatus = 3
)

func (ParticipantStatus) EnumDescriptor

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

func (ParticipantStatus) String

func (x ParticipantStatus) String() string

type ParticipantType

type ParticipantType int32
const (
	//X509 cert
	ParticipantType_CERT ParticipantType = 0
	//cert hash
	ParticipantType_CERT_HASH ParticipantType = 1
	//public key
	ParticipantType_PUBLIC_KEY ParticipantType = 2
	//did
	ParticipantType_DID ParticipantType = 3
	//alias
	ParticipantType_ALIAS ParticipantType = 4
	//address
	ParticipantType_ADDR ParticipantType = 5
)

func (ParticipantType) EnumDescriptor

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

func (ParticipantType) String

func (x ParticipantType) String() string

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 participant'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