common

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HTTPExtension_Verb_name = map[int32]string{
		0: "NONE",
		1: "GET",
		2: "HEAD",
		3: "POST",
		4: "PUT",
		5: "DELETE",
		6: "CONNECT",
		7: "OPTIONS",
		8: "TRACE",
		9: "PATCH",
	}
	HTTPExtension_Verb_value = map[string]int32{
		"NONE":    0,
		"GET":     1,
		"HEAD":    2,
		"POST":    3,
		"PUT":     4,
		"DELETE":  5,
		"CONNECT": 6,
		"OPTIONS": 7,
		"TRACE":   8,
		"PATCH":   9,
	}
)

Enum value maps for HTTPExtension_Verb.

View Source
var (
	StateOptions_StateConcurrency_name = map[int32]string{
		0: "CONCURRENCY_UNSPECIFIED",
		1: "CONCURRENCY_FIRST_WRITE",
		2: "CONCURRENCY_LAST_WRITE",
	}
	StateOptions_StateConcurrency_value = map[string]int32{
		"CONCURRENCY_UNSPECIFIED": 0,
		"CONCURRENCY_FIRST_WRITE": 1,
		"CONCURRENCY_LAST_WRITE":  2,
	}
)

Enum value maps for StateOptions_StateConcurrency.

View Source
var (
	StateOptions_StateConsistency_name = map[int32]string{
		0: "CONSISTENCY_UNSPECIFIED",
		1: "CONSISTENCY_EVENTUAL",
		2: "CONSISTENCY_STRONG",
	}
	StateOptions_StateConsistency_value = map[string]int32{
		"CONSISTENCY_UNSPECIFIED": 0,
		"CONSISTENCY_EVENTUAL":    1,
		"CONSISTENCY_STRONG":      2,
	}
)

Enum value maps for StateOptions_StateConsistency.

View Source
var File_dapr_proto_common_v1_common_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ConfigurationItem

type ConfigurationItem struct {

	// Required. The name of configuration item
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Required. The value of configuration item.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// Version is response only and cannot be fetched. Store is not expected to keep all versions available
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// the metadata which will be passed to/from configuration store component.
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

ConfigurationItem represents all the configuration with its name(key).

func (*ConfigurationItem) Descriptor deprecated

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

Deprecated: Use ConfigurationItem.ProtoReflect.Descriptor instead.

func (*ConfigurationItem) GetKey

func (x *ConfigurationItem) GetKey() string

func (*ConfigurationItem) GetMetadata

func (x *ConfigurationItem) GetMetadata() map[string]string

func (*ConfigurationItem) GetValue

func (x *ConfigurationItem) GetValue() string

func (*ConfigurationItem) GetVersion

func (x *ConfigurationItem) GetVersion() string

func (*ConfigurationItem) ProtoMessage

func (*ConfigurationItem) ProtoMessage()

func (*ConfigurationItem) ProtoReflect

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

func (*ConfigurationItem) Reset

func (x *ConfigurationItem) Reset()

func (*ConfigurationItem) String

func (x *ConfigurationItem) String() string

type Etag

type Etag struct {

	// value sets the etag value
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Etag represents a state item version

func (*Etag) Descriptor deprecated

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

Deprecated: Use Etag.ProtoReflect.Descriptor instead.

func (*Etag) GetValue

func (x *Etag) GetValue() string

func (*Etag) ProtoMessage

func (*Etag) ProtoMessage()

func (*Etag) ProtoReflect

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

func (*Etag) Reset

func (x *Etag) Reset()

func (*Etag) String

func (x *Etag) String() string

type HTTPExtension

type HTTPExtension struct {

	// Required. HTTP verb.
	Verb HTTPExtension_Verb `protobuf:"varint,1,opt,name=verb,proto3,enum=dapr.proto.common.v1.HTTPExtension_Verb" json:"verb,omitempty"`
	// Optional. querystring represents an encoded HTTP url query string in the following format: name=value&name2=value2
	Querystring string `protobuf:"bytes,2,opt,name=querystring,proto3" json:"querystring,omitempty"`
	// contains filtered or unexported fields
}

HTTPExtension includes HTTP verb and querystring when Dapr runtime delivers HTTP content.

For example, when callers calls http invoke api POST http://localhost:3500/v1.0/invoke/<app_id>/method/<method>?query1=value1&query2=value2

Dapr runtime will parse POST as a verb and extract querystring to quersytring map.

func (*HTTPExtension) Descriptor deprecated

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

Deprecated: Use HTTPExtension.ProtoReflect.Descriptor instead.

func (*HTTPExtension) GetQuerystring

func (x *HTTPExtension) GetQuerystring() string

func (*HTTPExtension) GetVerb

func (x *HTTPExtension) GetVerb() HTTPExtension_Verb

func (*HTTPExtension) ProtoMessage

func (*HTTPExtension) ProtoMessage()

func (*HTTPExtension) ProtoReflect

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

func (*HTTPExtension) Reset

func (x *HTTPExtension) Reset()

func (*HTTPExtension) String

func (x *HTTPExtension) String() string

type HTTPExtension_Verb

type HTTPExtension_Verb int32

Type of HTTP 1.1 Methods RFC 7231: https://tools.ietf.org/html/rfc7231#page-24 RFC 5789: https://datatracker.ietf.org/doc/html/rfc5789

const (
	HTTPExtension_NONE    HTTPExtension_Verb = 0
	HTTPExtension_GET     HTTPExtension_Verb = 1
	HTTPExtension_HEAD    HTTPExtension_Verb = 2
	HTTPExtension_POST    HTTPExtension_Verb = 3
	HTTPExtension_PUT     HTTPExtension_Verb = 4
	HTTPExtension_DELETE  HTTPExtension_Verb = 5
	HTTPExtension_CONNECT HTTPExtension_Verb = 6
	HTTPExtension_OPTIONS HTTPExtension_Verb = 7
	HTTPExtension_TRACE   HTTPExtension_Verb = 8
	HTTPExtension_PATCH   HTTPExtension_Verb = 9
)

func (HTTPExtension_Verb) Descriptor

func (HTTPExtension_Verb) Enum

func (HTTPExtension_Verb) EnumDescriptor deprecated

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

Deprecated: Use HTTPExtension_Verb.Descriptor instead.

func (HTTPExtension_Verb) Number

func (HTTPExtension_Verb) String

func (x HTTPExtension_Verb) String() string

func (HTTPExtension_Verb) Type

type InvokeRequest

type InvokeRequest struct {

	// Required. method is a method name which will be invoked by caller.
	Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	// Required. Bytes value or Protobuf message which caller sent.
	// Dapr treats Any.value as bytes type if Any.type_url is unset.
	Data *anypb.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// The type of data content.
	//
	// This field is required if data delivers http request body
	// Otherwise, this is optional.
	ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// HTTP specific fields if request conveys http-compatible request.
	//
	// This field is required for http-compatible request. Otherwise,
	// this field is optional.
	HttpExtension *HTTPExtension `protobuf:"bytes,4,opt,name=http_extension,json=httpExtension,proto3" json:"http_extension,omitempty"`
	// contains filtered or unexported fields
}

InvokeRequest is the message to invoke a method with the data. This message is used in InvokeService of Dapr gRPC Service and OnInvoke of AppCallback gRPC service.

func (*InvokeRequest) Descriptor deprecated

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

Deprecated: Use InvokeRequest.ProtoReflect.Descriptor instead.

func (*InvokeRequest) GetContentType

func (x *InvokeRequest) GetContentType() string

func (*InvokeRequest) GetData

func (x *InvokeRequest) GetData() *anypb.Any

func (*InvokeRequest) GetHttpExtension

func (x *InvokeRequest) GetHttpExtension() *HTTPExtension

func (*InvokeRequest) GetMethod

func (x *InvokeRequest) GetMethod() string

func (*InvokeRequest) ProtoMessage

func (*InvokeRequest) ProtoMessage()

func (*InvokeRequest) ProtoReflect

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

func (*InvokeRequest) Reset

func (x *InvokeRequest) Reset()

func (*InvokeRequest) String

func (x *InvokeRequest) String() string

type InvokeResponse

type InvokeResponse struct {

	// Required. The content body of InvokeService response.
	Data *anypb.Any `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// Required. The type of data content.
	ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// contains filtered or unexported fields
}

InvokeResponse is the response message inclduing data and its content type from app callback. This message is used in InvokeService of Dapr gRPC Service and OnInvoke of AppCallback gRPC service.

func (*InvokeResponse) Descriptor deprecated

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

Deprecated: Use InvokeResponse.ProtoReflect.Descriptor instead.

func (*InvokeResponse) GetContentType

func (x *InvokeResponse) GetContentType() string

func (*InvokeResponse) GetData

func (x *InvokeResponse) GetData() *anypb.Any

func (*InvokeResponse) ProtoMessage

func (*InvokeResponse) ProtoMessage()

func (*InvokeResponse) ProtoReflect

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

func (*InvokeResponse) Reset

func (x *InvokeResponse) Reset()

func (*InvokeResponse) String

func (x *InvokeResponse) String() string

type StateItem

type StateItem struct {

	// Required. The state key
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Required. The state data for key
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// The entity tag which represents the specific version of data.
	// The exact ETag format is defined by the corresponding data store.
	Etag *Etag `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"`
	// The metadata which will be passed to state store component.
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// Options for concurrency and consistency to save the state.
	Options *StateOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

StateItem represents state key, value, and additional options to save state.

func (*StateItem) Descriptor deprecated

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

Deprecated: Use StateItem.ProtoReflect.Descriptor instead.

func (*StateItem) GetEtag

func (x *StateItem) GetEtag() *Etag

func (*StateItem) GetKey

func (x *StateItem) GetKey() string

func (*StateItem) GetMetadata

func (x *StateItem) GetMetadata() map[string]string

func (*StateItem) GetOptions

func (x *StateItem) GetOptions() *StateOptions

func (*StateItem) GetValue

func (x *StateItem) GetValue() []byte

func (*StateItem) ProtoMessage

func (*StateItem) ProtoMessage()

func (*StateItem) ProtoReflect

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

func (*StateItem) Reset

func (x *StateItem) Reset()

func (*StateItem) String

func (x *StateItem) String() string

type StateOptions

type StateOptions struct {
	Concurrency StateOptions_StateConcurrency `` /* 132-byte string literal not displayed */
	Consistency StateOptions_StateConsistency `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

StateOptions configures concurrency and consistency for state operations

func (*StateOptions) Descriptor deprecated

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

Deprecated: Use StateOptions.ProtoReflect.Descriptor instead.

func (*StateOptions) GetConcurrency

func (x *StateOptions) GetConcurrency() StateOptions_StateConcurrency

func (*StateOptions) GetConsistency

func (x *StateOptions) GetConsistency() StateOptions_StateConsistency

func (*StateOptions) ProtoMessage

func (*StateOptions) ProtoMessage()

func (*StateOptions) ProtoReflect

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

func (*StateOptions) Reset

func (x *StateOptions) Reset()

func (*StateOptions) String

func (x *StateOptions) String() string

type StateOptions_StateConcurrency

type StateOptions_StateConcurrency int32

Enum describing the supported concurrency for state.

const (
	StateOptions_CONCURRENCY_UNSPECIFIED StateOptions_StateConcurrency = 0
	StateOptions_CONCURRENCY_FIRST_WRITE StateOptions_StateConcurrency = 1
	StateOptions_CONCURRENCY_LAST_WRITE  StateOptions_StateConcurrency = 2
)

func (StateOptions_StateConcurrency) Descriptor

func (StateOptions_StateConcurrency) Enum

func (StateOptions_StateConcurrency) EnumDescriptor deprecated

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

Deprecated: Use StateOptions_StateConcurrency.Descriptor instead.

func (StateOptions_StateConcurrency) Number

func (StateOptions_StateConcurrency) String

func (StateOptions_StateConcurrency) Type

type StateOptions_StateConsistency

type StateOptions_StateConsistency int32

Enum describing the supported consistency for state.

const (
	StateOptions_CONSISTENCY_UNSPECIFIED StateOptions_StateConsistency = 0
	StateOptions_CONSISTENCY_EVENTUAL    StateOptions_StateConsistency = 1
	StateOptions_CONSISTENCY_STRONG      StateOptions_StateConsistency = 2
)

func (StateOptions_StateConsistency) Descriptor

func (StateOptions_StateConsistency) Enum

func (StateOptions_StateConsistency) EnumDescriptor deprecated

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

Deprecated: Use StateOptions_StateConsistency.Descriptor instead.

func (StateOptions_StateConsistency) Number

func (StateOptions_StateConsistency) String

func (StateOptions_StateConsistency) Type

Jump to

Keyboard shortcuts

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