service

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

README

Dapr Service (Callback) SDK for Go

In addition to this Dapr API client, Dapr Go SDK also provides service package to bootstrap your Dapr callback services. These services can be developed in either gRPC or HTTP:

Templates

To accelerate your Dapr app development in Go even further, we've created a few GitHub templates which build on the above Dapr callback packages:

Contributing

See the Contribution Guide to get started with building and developing.

Documentation

Index

Constants

View Source
const (
	// SubscriptionResponseStatusSuccess means message is processed successfully.
	SubscriptionResponseStatusSuccess = "SUCCESS"
	// SubscriptionResponseStatusRetry means message to be retried by Dapr.
	SubscriptionResponseStatusRetry = "RETRY"
	// SubscriptionResponseStatusDrop means warning is logged and message is dropped.
	SubscriptionResponseStatusDrop = "DROP"
)
View Source
const (
	HeaderSource      = "Source"
	HeaderTopic       = "Topic"
	HeaderOwner       = "Owner"
	HeaderType        = "Type"
	HeaderMetadata    = "Metadata"
	HeaderContentType = "Content-Type"
	QueryType         = "type"

	Plugin = "plugin"
	User   = "user_id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity = apim.Base

type EntityService added in v0.2.0

type EntityService struct {
	pb.UnimplementedEntityServer
	// contains filtered or unexported fields
}

func NewEntityService added in v0.2.0

func NewEntityService(ctx context.Context) (*EntityService, error)

func (*EntityService) AppendMapper added in v0.2.0

func (s *EntityService) AppendMapper(ctx context.Context, req *pb.AppendMapperRequest) (out *pb.AppendMapperResponse, err error)

func (*EntityService) CreateEntity added in v0.2.0

func (s *EntityService) CreateEntity(ctx context.Context, req *pb.CreateEntityRequest) (out *pb.EntityResponse, err error)

func (*EntityService) DeleteEntity added in v0.2.0

func (s *EntityService) DeleteEntity(ctx context.Context, req *pb.DeleteEntityRequest) (out *pb.DeleteEntityResponse, err error)

func (*EntityService) GetEntity added in v0.2.0

func (s *EntityService) GetEntity(ctx context.Context, req *pb.GetEntityRequest) (out *pb.EntityResponse, err error)

func (*EntityService) GetEntityConfigs added in v0.4.1

func (s *EntityService) GetEntityConfigs(ctx context.Context, in *pb.GetEntityConfigsRequest) (out *pb.EntityResponse, err error)

QueryConfigs query entity configs.

func (*EntityService) GetEntityProps added in v0.3.0

func (s *EntityService) GetEntityProps(ctx context.Context, in *pb.GetEntityPropsRequest) (out *pb.EntityResponse, err error)

func (*EntityService) GetMapper added in v0.4.1

func (s *EntityService) GetMapper(ctx context.Context, in *pb.GetMapperRequest) (out *pb.GetMapperResponse, err error)

func (*EntityService) Init added in v0.4.1

func (s *EntityService) Init(apiManager apim.APIManager, searchClient pb.SearchHTTPServer)

func (*EntityService) ListEntity added in v0.2.0

func (s *EntityService) ListEntity(ctx context.Context, req *pb.ListEntityRequest) (out *pb.ListEntityResponse, err error)

func (*EntityService) ListMapper added in v0.4.1

func (s *EntityService) ListMapper(ctx context.Context, in *pb.ListMapperRequest) (out *pb.ListMapperResponse, err error)

func (*EntityService) PatchEntityConfigs added in v0.4.1

func (s *EntityService) PatchEntityConfigs(ctx context.Context, in *pb.PatchEntityConfigsRequest) (out *pb.EntityResponse, err error)

func (*EntityService) PatchEntityConfigsZ added in v0.4.1

func (s *EntityService) PatchEntityConfigsZ(ctx context.Context, req *pb.PatchEntityConfigsRequest) (out *pb.EntityResponse, err error)

func (*EntityService) PatchEntityProps added in v0.4.1

func (s *EntityService) PatchEntityProps(ctx context.Context, req *pb.PatchEntityPropsRequest) (out *pb.EntityResponse, err error)

func (*EntityService) PatchEntityPropsZ added in v0.4.1

func (s *EntityService) PatchEntityPropsZ(ctx context.Context, req *pb.PatchEntityPropsRequest) (out *pb.EntityResponse, err error)

func (*EntityService) RemoveEntityConfigs added in v0.4.1

func (s *EntityService) RemoveEntityConfigs(ctx context.Context, in *pb.RemoveEntityConfigsRequest) (out *pb.EntityResponse, err error)

RemoveConfigs remove entity configs.

func (*EntityService) RemoveEntityProps added in v0.4.1

func (s *EntityService) RemoveEntityProps(ctx context.Context, in *pb.RemoveEntityPropsRequest) (out *pb.EntityResponse, err error)

func (*EntityService) RemoveMapper added in v0.3.1

func (s *EntityService) RemoveMapper(ctx context.Context, req *pb.RemoveMapperRequest) (out *pb.RemoveMapperResponse, err error)

func (*EntityService) UpdateEntity added in v0.2.0

func (s *EntityService) UpdateEntity(ctx context.Context, req *pb.UpdateEntityRequest) (out *pb.EntityResponse, err error)

func (*EntityService) UpdateEntityConfigs added in v0.4.1

func (s *EntityService) UpdateEntityConfigs(ctx context.Context, in *pb.UpdateEntityConfigsRequest) (out *pb.EntityResponse, err error)

SetConfigs set entity configs.

func (*EntityService) UpdateEntityProps added in v0.4.1

func (s *EntityService) UpdateEntityProps(ctx context.Context, req *pb.UpdateEntityPropsRequest) (out *pb.EntityResponse, err error)

type MarshalField added in v0.2.1

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

func NewMarField added in v0.2.1

func NewMarField(v interface{}) MarshalField

func (MarshalField) String added in v0.2.1

func (m MarshalField) String() string

type Marshalable added in v0.2.1

type Marshalable interface {
	String() string
}

type PatchData added in v0.4.1

type PatchData struct {
	Path     string
	Operator string
	Value    interface{}
}

type ProxyService added in v0.4.1

type ProxyService struct {
	pb.UnimplementedProxyServer
	// contains filtered or unexported fields
}

func NewProxyService added in v0.4.1

func NewProxyService() *ProxyService

func (*ProxyService) Init added in v0.4.1

func (p *ProxyService) Init(apiManager apim.APIManager)

func (*ProxyService) Respond added in v0.4.1

type SearchService added in v0.2.0

type SearchService struct {
	pb.UnimplementedSearchServer
	// contains filtered or unexported fields
}

func NewSearchService added in v0.2.0

func NewSearchService() *SearchService

func (*SearchService) Index added in v0.2.0

func (s *SearchService) Index(ctx context.Context, req *pb.IndexObject) (*pb.IndexResponse, error)

func (*SearchService) Init added in v0.4.1

func (s *SearchService) Init(searchClient pb.SearchHTTPServer)

func (*SearchService) Search added in v0.2.0

type SubscriptionService added in v0.2.0

type SubscriptionService struct {
	pb.UnimplementedSubscriptionServer
	// contains filtered or unexported fields
}

func NewSubscriptionService added in v0.2.0

func NewSubscriptionService(ctx context.Context) (*SubscriptionService, error)

NewSubscriptionService returns a new SubscriptionService.

func (*SubscriptionService) CreateSubscription added in v0.2.0

func (s *SubscriptionService) CreateSubscription(ctx context.Context, req *pb.CreateSubscriptionRequest) (out *pb.SubscriptionResponse, err error)

func (*SubscriptionService) DeleteSubscription added in v0.2.0

func (*SubscriptionService) GetSubscription added in v0.2.0

func (s *SubscriptionService) GetSubscription(ctx context.Context, req *pb.GetSubscriptionRequest) (out *pb.SubscriptionResponse, err error)

func (*SubscriptionService) Init added in v0.4.1

func (s *SubscriptionService) Init(apiManager apim.APIManager)

func (*SubscriptionService) ListSubscription added in v0.2.0

func (*SubscriptionService) UpdateSubscription added in v0.2.0

func (s *SubscriptionService) UpdateSubscription(ctx context.Context, req *pb.UpdateSubscriptionRequest) (out *pb.SubscriptionResponse, err error)

type TSService added in v0.4.1

type TSService struct {
	pb.UnimplementedTSServer
	// contains filtered or unexported fields
}

func NewTSService added in v0.4.1

func NewTSService() (*TSService, error)

func (*TSService) AddEntity added in v0.4.1

func (s *TSService) AddEntity(user, entityID string)

func (*TSService) DownloadTSData added in v0.4.1

func (*TSService) GetLatestEntities added in v0.4.1

func (*TSService) GetTSData added in v0.4.1

func (s *TSService) GetTSData(ctx context.Context, req *pb.GetTSDataRequest) (*pb.GetTSDataResponse, error)

type TopicService added in v0.2.0

type TopicService struct {
	pb.UnimplementedTopicServer
	// contains filtered or unexported fields
}

func NewTopicService added in v0.2.0

func NewTopicService(ctx context.Context) (*TopicService, error)

func (*TopicService) Init added in v0.4.1

func (s *TopicService) Init(apiManager apim.APIManager)

func (*TopicService) TopicClusterEventHandler added in v0.4.1

func (s *TopicService) TopicClusterEventHandler(ctx context.Context, req *pb.TopicEventRequest) (out *pb.TopicEventResponse, err error)

func (*TopicService) TopicEventHandler added in v0.2.0

func (s *TopicService) TopicEventHandler(ctx context.Context, req *pb.TopicEventRequest) (out *pb.TopicEventResponse, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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