resourcev2

package
v0.0.0-...-33d2b2d Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var File_cheqd_resource_v2_fee_proto protoreflect.FileDescriptor
View Source
var File_cheqd_resource_v2_genesis_proto protoreflect.FileDescriptor
View Source
var File_cheqd_resource_v2_query_proto protoreflect.FileDescriptor
View Source
var File_cheqd_resource_v2_resource_proto protoreflect.FileDescriptor
View Source
var File_cheqd_resource_v2_tx_proto protoreflect.FileDescriptor
View Source
var Msg_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cheqd.resource.v2.Msg",
	HandlerType: (*MsgServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateResource",
			Handler:    _Msg_CreateResource_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cheqd/resource/v2/tx.proto",
}

Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Query_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cheqd.resource.v2.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Resource",
			Handler:    _Query_Resource_Handler,
		},
		{
			MethodName: "ResourceMetadata",
			Handler:    _Query_ResourceMetadata_Handler,
		},
		{
			MethodName: "CollectionResources",
			Handler:    _Query_CollectionResources_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cheqd/resource/v2/query.proto",
}

Query_ServiceDesc is the grpc.ServiceDesc for Query service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMsgServer

func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer)

func RegisterQueryServer

func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)

Types

type AlternativeUri

type AlternativeUri struct {

	// uri is the URI of the Resource.
	// Examples:
	// - did:cheqd:testnet:MjYxNzYKMjYxNzYK/resources/4600ea35-8916-4ac4-b412-55b8f49dd94e
	// - https://resolver..cheqd.net/1.0/identifiers/did:cheqd:testnet:MjYxNzYKMjYxNzYK/resources/4600ea35-8916-4ac4-b412-55b8f49dd94e
	// - https://example.com/example.json
	// - https://gateway.ipfs.io/ipfs/bafybeihetj2ng3d74k7t754atv2s5dk76pcqtvxls6dntef3xa6rax25xe
	// - ipfs://bafybeihetj2ng3d74k7t754atv2s5dk76pcqtvxls6dntef3xa6rax25xe
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// description is a human-readable description of the URI. Defined client-side.
	// Examples:
	// - did-uri
	// - http-uri
	// - ipfs-uri
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

AlternativeUri are alternative URIs that can be used to access the Resource. By default, at least the DID URI equivalent of the Resource is populated.

func (*AlternativeUri) Descriptor deprecated

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

Deprecated: Use AlternativeUri.ProtoReflect.Descriptor instead.

func (*AlternativeUri) GetDescription

func (x *AlternativeUri) GetDescription() string

func (*AlternativeUri) GetUri

func (x *AlternativeUri) GetUri() string

func (*AlternativeUri) ProtoMessage

func (*AlternativeUri) ProtoMessage()

func (*AlternativeUri) ProtoReflect

func (x *AlternativeUri) ProtoReflect() protoreflect.Message

func (*AlternativeUri) Reset

func (x *AlternativeUri) Reset()

func (*AlternativeUri) String

func (x *AlternativeUri) String() string

type FeeParams

type FeeParams struct {

	// Fixed fee for creating a resource with media type 'image/*'
	//
	// Default: 10 CHEQ or 10000000000ncheq
	Image *v1beta1.Coin `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	// Fixed fee for creating a resource with media type 'application/json'
	//
	// Default: 2.5 CHEQ or 2500000000ncheq
	Json *v1beta1.Coin `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"`
	// Fixed fee for creating a resource with all other media types
	//
	// Default: 5 CHEQ or 5000000000ncheq
	Default *v1beta1.Coin `protobuf:"bytes,3,opt,name=default,proto3" json:"default,omitempty"`
	// Percentage of the fixed fee that will be burned
	//
	// Default: 0.5 (50%)
	BurnFactor string `protobuf:"bytes,4,opt,name=burn_factor,json=burnFactor,proto3" json:"burn_factor,omitempty"`
	// contains filtered or unexported fields
}

FeeParams defines the parameters for the cheqd Resource module fixed fee. Creation requests for different IANA media types are charged different fees.

func (*FeeParams) Descriptor deprecated

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

Deprecated: Use FeeParams.ProtoReflect.Descriptor instead.

func (*FeeParams) GetBurnFactor

func (x *FeeParams) GetBurnFactor() string

func (*FeeParams) GetDefault

func (x *FeeParams) GetDefault() *v1beta1.Coin

func (*FeeParams) GetImage

func (x *FeeParams) GetImage() *v1beta1.Coin

func (*FeeParams) GetJson

func (x *FeeParams) GetJson() *v1beta1.Coin

func (*FeeParams) ProtoMessage

func (*FeeParams) ProtoMessage()

func (*FeeParams) ProtoReflect

func (x *FeeParams) ProtoReflect() protoreflect.Message

func (*FeeParams) Reset

func (x *FeeParams) Reset()

func (*FeeParams) String

func (x *FeeParams) String() string

type GenesisState

type GenesisState struct {

	// All Resources with metadata
	Resources []*ResourceWithMetadata `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
	// Fee parameters for the Resource module
	// Defines fixed fees and burn percentage for resources
	FeeParams *FeeParams `protobuf:"bytes,2,opt,name=fee_params,json=feeParams,proto3" json:"fee_params,omitempty"`
	// contains filtered or unexported fields
}

GenesisState defines the chqed Resource module's genesis state

func (*GenesisState) Descriptor deprecated

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

Deprecated: Use GenesisState.ProtoReflect.Descriptor instead.

func (*GenesisState) GetFeeParams

func (x *GenesisState) GetFeeParams() *FeeParams

func (*GenesisState) GetResources

func (x *GenesisState) GetResources() []*ResourceWithMetadata

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) ProtoReflect

func (x *GenesisState) ProtoReflect() protoreflect.Message

func (*GenesisState) Reset

func (x *GenesisState) Reset()

func (*GenesisState) String

func (x *GenesisState) String() string

type Metadata

type Metadata struct {

	// collection_id is the ID of the collection that the Resource belongs to. Defined client-side.
	// This field is the unique identifier of the DID linked to this Resource
	// Format: <unique-identifier>
	//
	// Examples:
	// - c82f2b02-bdab-4dd7-b833-3e143745d612
	// - wGHEXrZvJxR8vw5P3UWH1j
	CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	// id is the ID of the Resource. Defined client-side.
	// This field is a unique identifier for this specific version of the Resource.
	// Format: <uuid>
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// name is a human-readable name for the Resource. Defined client-side.
	// Does not change between different versions.
	// Example: PassportSchema, EducationTrustRegistry
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// version is a human-readable semantic version for the Resource. Defined client-side.
	// Stored as a string. OPTIONAL.
	// Example: 1.0.0, v2.1.0
	Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
	// resource_type is a Resource type that identifies what the Resource is. Defined client-side.
	// This is NOT the same as the resource's media type.
	// Example: AnonCredsSchema, StatusList2021
	ResourceType string `protobuf:"bytes,5,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
	// List of alternative URIs for the SAME Resource.
	AlsoKnownAs []*AlternativeUri `protobuf:"bytes,6,rep,name=also_known_as,json=alsoKnownAs,proto3" json:"also_known_as,omitempty"`
	// media_type is IANA media type of the Resource. Defined ledger-side.
	// Example: application/json, image/png
	MediaType string `protobuf:"bytes,7,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
	// created is the time at which the Resource was created. Defined ledger-side.
	// Format: RFC3339
	// Example: 2021-01-01T00:00:00Z
	Created *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created,proto3" json:"created,omitempty"`
	// checksum is a SHA-256 checksum hash of the Resource. Defined ledger-side.
	// Example: d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f
	Checksum string `protobuf:"bytes,9,opt,name=checksum,proto3" json:"checksum,omitempty"`
	// previous_version_id is the ID of the previous version of the Resource. Defined ledger-side.
	// This is based on the Resource's name and Resource type to determine whether it's the same Resource.
	// Format: <uuid>
	PreviousVersionId string `protobuf:"bytes,10,opt,name=previous_version_id,json=previousVersionId,proto3" json:"previous_version_id,omitempty"`
	// next_version_id is the ID of the next version of the Resource. Defined ledger-side.
	// This is based on the Resource's name and Resource type to determine whether it's the same Resource.
	// Format: <uuid>
	NextVersionId string `protobuf:"bytes,11,opt,name=next_version_id,json=nextVersionId,proto3" json:"next_version_id,omitempty"`
	// contains filtered or unexported fields
}

Metadata stores the metadata of a DID-Linked Resource

func (*Metadata) Descriptor deprecated

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetAlsoKnownAs

func (x *Metadata) GetAlsoKnownAs() []*AlternativeUri

func (*Metadata) GetChecksum

func (x *Metadata) GetChecksum() string

func (*Metadata) GetCollectionId

func (x *Metadata) GetCollectionId() string

func (*Metadata) GetCreated

func (x *Metadata) GetCreated() *timestamppb.Timestamp

func (*Metadata) GetId

func (x *Metadata) GetId() string

func (*Metadata) GetMediaType

func (x *Metadata) GetMediaType() string

func (*Metadata) GetName

func (x *Metadata) GetName() string

func (*Metadata) GetNextVersionId

func (x *Metadata) GetNextVersionId() string

func (*Metadata) GetPreviousVersionId

func (x *Metadata) GetPreviousVersionId() string

func (*Metadata) GetResourceType

func (x *Metadata) GetResourceType() string

func (*Metadata) GetVersion

func (x *Metadata) GetVersion() string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

func (x *Metadata) ProtoReflect() protoreflect.Message

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type MsgClient

type MsgClient interface {
	// CreateResource defines a method for creating a resource.
	CreateResource(ctx context.Context, in *MsgCreateResource, opts ...grpc.CallOption) (*MsgCreateResourceResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc.ClientConnInterface) MsgClient

type MsgCreateResource

type MsgCreateResource struct {

	// Payload containing the resource to be created.
	Payload *MsgCreateResourcePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// Signatures of the corresponding DID Document's controller(s).
	Signatures []*v2.SignInfo `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
	// contains filtered or unexported fields
}

MsgCreateResource defines the Msg/CreateResource request type. It describes the parameters of a request for creating a resource.

func (*MsgCreateResource) Descriptor deprecated

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

Deprecated: Use MsgCreateResource.ProtoReflect.Descriptor instead.

func (*MsgCreateResource) GetPayload

func (*MsgCreateResource) GetSignatures

func (x *MsgCreateResource) GetSignatures() []*v2.SignInfo

func (*MsgCreateResource) ProtoMessage

func (*MsgCreateResource) ProtoMessage()

func (*MsgCreateResource) ProtoReflect

func (x *MsgCreateResource) ProtoReflect() protoreflect.Message

func (*MsgCreateResource) Reset

func (x *MsgCreateResource) Reset()

func (*MsgCreateResource) String

func (x *MsgCreateResource) String() string

type MsgCreateResourcePayload

type MsgCreateResourcePayload struct {

	// data is a byte-representation of the actual Data the user wants to store.
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// collection_id is an identifier of the DidDocument the resource belongs to.
	// Format: <unique-identifier>
	//
	// Examples:
	// - c82f2b02-bdab-4dd7-b833-3e143745d612
	// - wGHEXrZvJxR8vw5P3UWH1j
	CollectionId string `protobuf:"bytes,2,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	// id is a unique id of the resource.
	// Format: <uuid>
	Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	// name is a human-readable name of the resource.
	// Format: <string>
	//
	// Does not change between different versions.
	// Example: PassportSchema, EducationTrustRegistry
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// version is a version of the resource.
	// Format: <string>
	// Stored as a string. OPTIONAL.
	//
	// Example: 1.0.0, v2.1.0
	Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
	// resource_type is a type of the resource.
	// Format: <string>
	//
	// This is NOT the same as the resource's media type.
	// Example: AnonCredsSchema, StatusList2021
	ResourceType string `protobuf:"bytes,6,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
	// also_known_as is a list of URIs that can be used to get the resource.
	AlsoKnownAs []*AlternativeUri `protobuf:"bytes,7,rep,name=also_known_as,json=alsoKnownAs,proto3" json:"also_known_as,omitempty"`
	// contains filtered or unexported fields
}

MsgCreateResourcePayload defines the structure of the payload for creating a resource.

If a resource with the given id does not exist already, it will be created. The resource will be created in the resource collection.

If a resource with the given id, collection_id already exists, an error code 2200 will be returned.

A new version of the resource in an existing collection will be created, if a resource in that collection with the same name, resource_type and empty next_version_id exists.

An update operation is not possible, because the resource is immutable by design.

func (*MsgCreateResourcePayload) Descriptor deprecated

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

Deprecated: Use MsgCreateResourcePayload.ProtoReflect.Descriptor instead.

func (*MsgCreateResourcePayload) GetAlsoKnownAs

func (x *MsgCreateResourcePayload) GetAlsoKnownAs() []*AlternativeUri

func (*MsgCreateResourcePayload) GetCollectionId

func (x *MsgCreateResourcePayload) GetCollectionId() string

func (*MsgCreateResourcePayload) GetData

func (x *MsgCreateResourcePayload) GetData() []byte

func (*MsgCreateResourcePayload) GetId

func (x *MsgCreateResourcePayload) GetId() string

func (*MsgCreateResourcePayload) GetName

func (x *MsgCreateResourcePayload) GetName() string

func (*MsgCreateResourcePayload) GetResourceType

func (x *MsgCreateResourcePayload) GetResourceType() string

func (*MsgCreateResourcePayload) GetVersion

func (x *MsgCreateResourcePayload) GetVersion() string

func (*MsgCreateResourcePayload) ProtoMessage

func (*MsgCreateResourcePayload) ProtoMessage()

func (*MsgCreateResourcePayload) ProtoReflect

func (x *MsgCreateResourcePayload) ProtoReflect() protoreflect.Message

func (*MsgCreateResourcePayload) Reset

func (x *MsgCreateResourcePayload) Reset()

func (*MsgCreateResourcePayload) String

func (x *MsgCreateResourcePayload) String() string

type MsgCreateResourceResponse

type MsgCreateResourceResponse struct {

	// Return the created resource metadata.
	Resource *Metadata `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

func (*MsgCreateResourceResponse) Descriptor deprecated

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

Deprecated: Use MsgCreateResourceResponse.ProtoReflect.Descriptor instead.

func (*MsgCreateResourceResponse) GetResource

func (x *MsgCreateResourceResponse) GetResource() *Metadata

func (*MsgCreateResourceResponse) ProtoMessage

func (*MsgCreateResourceResponse) ProtoMessage()

func (*MsgCreateResourceResponse) ProtoReflect

func (*MsgCreateResourceResponse) Reset

func (x *MsgCreateResourceResponse) Reset()

func (*MsgCreateResourceResponse) String

func (x *MsgCreateResourceResponse) String() string

type MsgServer

type MsgServer interface {
	// CreateResource defines a method for creating a resource.
	CreateResource(context.Context, *MsgCreateResource) (*MsgCreateResourceResponse, error)
	// contains filtered or unexported methods
}

MsgServer is the server API for Msg service. All implementations must embed UnimplementedMsgServer for forward compatibility

type QueryClient

type QueryClient interface {
	// Fetch data/payload for a specific resource (without metadata)
	Resource(ctx context.Context, in *QueryResourceRequest, opts ...grpc.CallOption) (*QueryResourceResponse, error)
	// Fetch only metadata for a specific resource
	ResourceMetadata(ctx context.Context, in *QueryResourceMetadataRequest, opts ...grpc.CallOption) (*QueryResourceMetadataResponse, error)
	// Fetch metadata for all resources in a collection
	CollectionResources(ctx context.Context, in *QueryCollectionResourcesRequest, opts ...grpc.CallOption) (*QueryCollectionResourcesResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc.ClientConnInterface) QueryClient

type QueryCollectionResourcesRequest

type QueryCollectionResourcesRequest struct {

	// collection_id is an identifier of the DidDocument the resource belongs to.
	// Format: <unique-identifier>
	//
	// Examples:
	// - c82f2b02-bdab-4dd7-b833-3e143745d612
	// - wGHEXrZvJxR8vw5P3UWH1j
	CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

QueryCollectionResourcesRequest is the request type for the Query/CollectionResources RPC method

func (*QueryCollectionResourcesRequest) Descriptor deprecated

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

Deprecated: Use QueryCollectionResourcesRequest.ProtoReflect.Descriptor instead.

func (*QueryCollectionResourcesRequest) GetCollectionId

func (x *QueryCollectionResourcesRequest) GetCollectionId() string

func (*QueryCollectionResourcesRequest) GetPagination

func (*QueryCollectionResourcesRequest) ProtoMessage

func (*QueryCollectionResourcesRequest) ProtoMessage()

func (*QueryCollectionResourcesRequest) ProtoReflect

func (*QueryCollectionResourcesRequest) Reset

func (*QueryCollectionResourcesRequest) String

type QueryCollectionResourcesResponse

type QueryCollectionResourcesResponse struct {

	// resources is the requested collection of resource metadata
	Resources []*Metadata `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

QueryCollectionResourcesResponse is the response type for the Query/CollectionResources RPC method

func (*QueryCollectionResourcesResponse) Descriptor deprecated

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

Deprecated: Use QueryCollectionResourcesResponse.ProtoReflect.Descriptor instead.

func (*QueryCollectionResourcesResponse) GetPagination

func (*QueryCollectionResourcesResponse) GetResources

func (x *QueryCollectionResourcesResponse) GetResources() []*Metadata

func (*QueryCollectionResourcesResponse) ProtoMessage

func (*QueryCollectionResourcesResponse) ProtoMessage()

func (*QueryCollectionResourcesResponse) ProtoReflect

func (*QueryCollectionResourcesResponse) Reset

func (*QueryCollectionResourcesResponse) String

type QueryResourceMetadataRequest

type QueryResourceMetadataRequest struct {

	// collection_id is an identifier of the DidDocument the resource belongs to.
	// Format: <unique-identifier>
	//
	// Examples:
	// - c82f2b02-bdab-4dd7-b833-3e143745d612
	// - wGHEXrZvJxR8vw5P3UWH1j
	CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	// id is a unique id of the resource.
	// Format: <uuid>
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

QueryResourceMetadataRequest is the request type for the Query/ResourceMetadata RPC method

func (*QueryResourceMetadataRequest) Descriptor deprecated

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

Deprecated: Use QueryResourceMetadataRequest.ProtoReflect.Descriptor instead.

func (*QueryResourceMetadataRequest) GetCollectionId

func (x *QueryResourceMetadataRequest) GetCollectionId() string

func (*QueryResourceMetadataRequest) GetId

func (*QueryResourceMetadataRequest) ProtoMessage

func (*QueryResourceMetadataRequest) ProtoMessage()

func (*QueryResourceMetadataRequest) ProtoReflect

func (*QueryResourceMetadataRequest) Reset

func (x *QueryResourceMetadataRequest) Reset()

func (*QueryResourceMetadataRequest) String

type QueryResourceMetadataResponse

type QueryResourceMetadataResponse struct {

	// resource is the requested resource metadata
	Resource *Metadata `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

QueryResourceMetadataResponse is the response type for the Query/ResourceMetadata RPC method

func (*QueryResourceMetadataResponse) Descriptor deprecated

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

Deprecated: Use QueryResourceMetadataResponse.ProtoReflect.Descriptor instead.

func (*QueryResourceMetadataResponse) GetResource

func (x *QueryResourceMetadataResponse) GetResource() *Metadata

func (*QueryResourceMetadataResponse) ProtoMessage

func (*QueryResourceMetadataResponse) ProtoMessage()

func (*QueryResourceMetadataResponse) ProtoReflect

func (*QueryResourceMetadataResponse) Reset

func (x *QueryResourceMetadataResponse) Reset()

func (*QueryResourceMetadataResponse) String

type QueryResourceRequest

type QueryResourceRequest struct {

	// collection_id is an identifier of the DidDocument the resource belongs to.
	// Format: <unique-identifier>
	//
	// Examples:
	// - c82f2b02-bdab-4dd7-b833-3e143745d612
	// - wGHEXrZvJxR8vw5P3UWH1j
	CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	// id is a unique id of the resource.
	// Format: <uuid>
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

QueryResourceRequest is the request type for the Query/Resource RPC method

func (*QueryResourceRequest) Descriptor deprecated

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

Deprecated: Use QueryResourceRequest.ProtoReflect.Descriptor instead.

func (*QueryResourceRequest) GetCollectionId

func (x *QueryResourceRequest) GetCollectionId() string

func (*QueryResourceRequest) GetId

func (x *QueryResourceRequest) GetId() string

func (*QueryResourceRequest) ProtoMessage

func (*QueryResourceRequest) ProtoMessage()

func (*QueryResourceRequest) ProtoReflect

func (x *QueryResourceRequest) ProtoReflect() protoreflect.Message

func (*QueryResourceRequest) Reset

func (x *QueryResourceRequest) Reset()

func (*QueryResourceRequest) String

func (x *QueryResourceRequest) String() string

type QueryResourceResponse

type QueryResourceResponse struct {

	// Successful resolution of the resource returns the following:
	// - resource is the requested resource
	// - metadata is the resource metadata associated with the requested resource
	Resource *ResourceWithMetadata `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

QueryResourceResponse is the response type for the Query/Resource RPC method

func (*QueryResourceResponse) Descriptor deprecated

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

Deprecated: Use QueryResourceResponse.ProtoReflect.Descriptor instead.

func (*QueryResourceResponse) GetResource

func (x *QueryResourceResponse) GetResource() *ResourceWithMetadata

func (*QueryResourceResponse) ProtoMessage

func (*QueryResourceResponse) ProtoMessage()

func (*QueryResourceResponse) ProtoReflect

func (x *QueryResourceResponse) ProtoReflect() protoreflect.Message

func (*QueryResourceResponse) Reset

func (x *QueryResourceResponse) Reset()

func (*QueryResourceResponse) String

func (x *QueryResourceResponse) String() string

type QueryServer

type QueryServer interface {
	// Fetch data/payload for a specific resource (without metadata)
	Resource(context.Context, *QueryResourceRequest) (*QueryResourceResponse, error)
	// Fetch only metadata for a specific resource
	ResourceMetadata(context.Context, *QueryResourceMetadataRequest) (*QueryResourceMetadataResponse, error)
	// Fetch metadata for all resources in a collection
	CollectionResources(context.Context, *QueryCollectionResourcesRequest) (*QueryCollectionResourcesResponse, error)
	// contains filtered or unexported methods
}

QueryServer is the server API for Query service. All implementations must embed UnimplementedQueryServer for forward compatibility

type Resource

type Resource struct {

	// bytes is the raw data of the Resource
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Resource stores the contents of a DID-Linked Resource

func (*Resource) Descriptor deprecated

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

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetData

func (x *Resource) GetData() []byte

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

func (x *Resource) ProtoReflect() protoreflect.Message

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type ResourceWithMetadata

type ResourceWithMetadata struct {
	Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

ResourceWithMetadata describes the overall structure of a DID-Linked Resource

func (*ResourceWithMetadata) Descriptor deprecated

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

Deprecated: Use ResourceWithMetadata.ProtoReflect.Descriptor instead.

func (*ResourceWithMetadata) GetMetadata

func (x *ResourceWithMetadata) GetMetadata() *Metadata

func (*ResourceWithMetadata) GetResource

func (x *ResourceWithMetadata) GetResource() *Resource

func (*ResourceWithMetadata) ProtoMessage

func (*ResourceWithMetadata) ProtoMessage()

func (*ResourceWithMetadata) ProtoReflect

func (x *ResourceWithMetadata) ProtoReflect() protoreflect.Message

func (*ResourceWithMetadata) Reset

func (x *ResourceWithMetadata) Reset()

func (*ResourceWithMetadata) String

func (x *ResourceWithMetadata) String() string

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer must be embedded to have forward compatible implementations.

func (UnimplementedMsgServer) CreateResource

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer must be embedded to have forward compatible implementations.

func (UnimplementedQueryServer) Resource

type UnsafeMsgServer

type UnsafeMsgServer interface {
	// contains filtered or unexported methods
}

UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MsgServer will result in compilation errors.

type UnsafeQueryServer

type UnsafeQueryServer interface {
	// contains filtered or unexported methods
}

UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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