Documentation ¶
Index ¶
- func NewAggregate(ctx context.Context, resourceId string, userDeviceIds []string, ...) (*aggregate, error)
- type ClientCertManager
- type Config
- type EventStore
- type LogPublishErrFunc
- type RequestHandler
- func (r RequestHandler) ConfirmResourceRetrieve(ctx context.Context, request *pb.ConfirmResourceRetrieveRequest) (*pb.ConfirmResourceRetrieveResponse, error)
- func (r RequestHandler) ConfirmResourceUpdate(ctx context.Context, request *pb.ConfirmResourceUpdateRequest) (*pb.ConfirmResourceUpdateResponse, error)
- func (r RequestHandler) GetUsersDevices(ctx context.Context, authCtx *pb.AuthorizationContext) ([]string, error)
- func (r RequestHandler) NotifyResourceChanged(ctx context.Context, request *pb.NotifyResourceChangedRequest) (*pb.NotifyResourceChangedResponse, error)
- func (r RequestHandler) PublishResource(ctx context.Context, request *pb.PublishResourceRequest) (*pb.PublishResourceResponse, error)
- func (r RequestHandler) RetrieveResource(ctx context.Context, request *pb.RetrieveResourceRequest) (*pb.RetrieveResourceResponse, error)
- func (r RequestHandler) UnpublishResource(ctx context.Context, request *pb.UnpublishResourceRequest) (*pb.UnpublishResourceResponse, error)
- func (r RequestHandler) UpdateResource(ctx context.Context, request *pb.UpdateResourceRequest) (*pb.UpdateResourceResponse, error)
- type Server
- type ServerCertManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientCertManager ¶
type Config ¶
type Config struct { grpc.Config AuthServerAddr string `envconfig:"AUTH_SERVER_ADDRESS" default:"127.0.0.1:9100"` SnapshotThreshold int `envconfig:"SNAPSHOT_THRESHOLD" default:"128"` ConcurrencyExceptionMaxRetry int `envconfig:"OCC_MAX_RETRY" default:"8"` }
Config represent application configuration
type EventStore ¶
type EventStore interface { cqrsEventStore.EventStore cqrsMaintenance.EventStore GetInstanceId(ctx context.Context, resourceId string) (int64, error) RemoveInstanceId(ctx context.Context, instanceId int64) error }
type LogPublishErrFunc ¶
type LogPublishErrFunc func(err error)
type RequestHandler ¶
type RequestHandler struct {
// contains filtered or unexported fields
}
RequestHandler for handling incoming request
func NewRequestHandler ¶
func NewRequestHandler(config Config, eventstore EventStore, publisher cqrsEventBus.Publisher, authClient pbAS.AuthorizationServiceClient) *RequestHandler
NewRequestHandler factory for new RequestHandler
func (RequestHandler) ConfirmResourceRetrieve ¶
func (r RequestHandler) ConfirmResourceRetrieve(ctx context.Context, request *pb.ConfirmResourceRetrieveRequest) (*pb.ConfirmResourceRetrieveResponse, error)
func (RequestHandler) ConfirmResourceUpdate ¶
func (r RequestHandler) ConfirmResourceUpdate(ctx context.Context, request *pb.ConfirmResourceUpdateRequest) (*pb.ConfirmResourceUpdateResponse, error)
func (RequestHandler) GetUsersDevices ¶
func (r RequestHandler) GetUsersDevices(ctx context.Context, authCtx *pb.AuthorizationContext) ([]string, error)
func (RequestHandler) NotifyResourceChanged ¶
func (r RequestHandler) NotifyResourceChanged(ctx context.Context, request *pb.NotifyResourceChangedRequest) (*pb.NotifyResourceChangedResponse, error)
func (RequestHandler) PublishResource ¶
func (r RequestHandler) PublishResource(ctx context.Context, request *pb.PublishResourceRequest) (*pb.PublishResourceResponse, error)
func (RequestHandler) RetrieveResource ¶
func (r RequestHandler) RetrieveResource(ctx context.Context, request *pb.RetrieveResourceRequest) (*pb.RetrieveResourceResponse, error)
func (RequestHandler) UnpublishResource ¶
func (r RequestHandler) UnpublishResource(ctx context.Context, request *pb.UnpublishResourceRequest) (*pb.UnpublishResourceResponse, error)
func (RequestHandler) UpdateResource ¶
func (r RequestHandler) UpdateResource(ctx context.Context, request *pb.UpdateResourceRequest) (*pb.UpdateResourceResponse, error)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server handle HTTP request
func New ¶
func New(config Config, clientCertManager ClientCertManager, serverCertManager ServerCertManager, eventStore EventStore, publisher cqrsEventBus.Publisher) *Server
New creates new Server with provided store and publisher.
type ServerCertManager ¶
Click to show internal directories.
Click to hide internal directories.