Documentation ¶
Index ¶
- func NewJourneyAPI(repo repo.Repo, producer kafka.Producer, metric metrics.Metrics, chunkSize int) desc.JourneyApiV1Server
- type JourneyAPI
- func (api *JourneyAPI) CreateJourneyTaskV1(ctx context.Context, req *desc.CreateJourneyTaskRequestV1) (*emptypb.Empty, error)
- func (api *JourneyAPI) CreateJourneyV1(ctx context.Context, req *desc.CreateJourneyRequestV1) (*desc.CreateJourneyResponseV1, error)
- func (api *JourneyAPI) DescribeJourneyV1(ctx context.Context, req *desc.DescribeJourneyRequestV1) (*desc.DescribeJourneyResponseV1, error)
- func (api *JourneyAPI) ListJourneysV1(ctx context.Context, req *desc.ListJourneysRequestV1) (*desc.ListJourneysResponseV1, error)
- func (api *JourneyAPI) MultiCreateJourneyTaskV1(ctx context.Context, req *desc.MultiCreateJourneyTaskRequestV1) (*emptypb.Empty, error)
- func (api *JourneyAPI) MultiCreateJourneyV1(ctx context.Context, req *desc.MultiCreateJourneyRequestV1) (*desc.MultiCreateJourneyResponseV1, error)
- func (api *JourneyAPI) RemoveJourneyTaskV1(ctx context.Context, req *desc.RemoveJourneyTaskRequestV1) (*emptypb.Empty, error)
- func (api *JourneyAPI) RemoveJourneyV1(ctx context.Context, req *desc.RemoveJourneyRequestV1) (*emptypb.Empty, error)
- func (api *JourneyAPI) UpdateJourneyTaskV1(ctx context.Context, req *desc.UpdateJourneyTaskRequestV1) (*emptypb.Empty, error)
- func (api *JourneyAPI) UpdateJourneyV1(ctx context.Context, req *desc.UpdateJourneyRequestV1) (*emptypb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JourneyAPI ¶
type JourneyAPI struct { desc.UnimplementedJourneyApiV1Server // contains filtered or unexported fields }
JourneyAPI - gRPC API implementation for working with journeys
func (*JourneyAPI) CreateJourneyTaskV1 ¶
func (api *JourneyAPI) CreateJourneyTaskV1(ctx context.Context, req *desc.CreateJourneyTaskRequestV1) (*emptypb.Empty, error)
CreateJourneyTaskV1 - create new journey using producer
func (*JourneyAPI) CreateJourneyV1 ¶
func (api *JourneyAPI) CreateJourneyV1(ctx context.Context, req *desc.CreateJourneyRequestV1) (*desc.CreateJourneyResponseV1, error)
CreateJourneyV1 - create new journey
func (*JourneyAPI) DescribeJourneyV1 ¶
func (api *JourneyAPI) DescribeJourneyV1(ctx context.Context, req *desc.DescribeJourneyRequestV1) (*desc.DescribeJourneyResponseV1, error)
DescribeJourneyV1 - get journey description by journeyID
func (*JourneyAPI) ListJourneysV1 ¶
func (api *JourneyAPI) ListJourneysV1(ctx context.Context, req *desc.ListJourneysRequestV1) (*desc.ListJourneysResponseV1, error)
ListJourneysV1 - get list of journey with offset and limit
func (*JourneyAPI) MultiCreateJourneyTaskV1 ¶
func (api *JourneyAPI) MultiCreateJourneyTaskV1(ctx context.Context, req *desc.MultiCreateJourneyTaskRequestV1) (*emptypb.Empty, error)
MultiCreateJourneyTaskV1 - create new journeys using producer and splitting on chunks
func (*JourneyAPI) MultiCreateJourneyV1 ¶
func (api *JourneyAPI) MultiCreateJourneyV1(ctx context.Context, req *desc.MultiCreateJourneyRequestV1) (*desc.MultiCreateJourneyResponseV1, error)
MultiCreateJourneyV1 - create new journeys using chunks and return added journeys ids. If there is error for any chunk returns already added ids and error.
func (*JourneyAPI) RemoveJourneyTaskV1 ¶
func (api *JourneyAPI) RemoveJourneyTaskV1(ctx context.Context, req *desc.RemoveJourneyTaskRequestV1) (*emptypb.Empty, error)
RemoveJourneyTaskV1 - remove journey using producer
func (*JourneyAPI) RemoveJourneyV1 ¶
func (api *JourneyAPI) RemoveJourneyV1(ctx context.Context, req *desc.RemoveJourneyRequestV1) (*emptypb.Empty, error)
RemoveJourneyV1 - remove journey
func (*JourneyAPI) UpdateJourneyTaskV1 ¶
func (api *JourneyAPI) UpdateJourneyTaskV1(ctx context.Context, req *desc.UpdateJourneyTaskRequestV1) (*emptypb.Empty, error)
UpdateJourneyTaskV1 - find journey by id and update another fields using producer
func (*JourneyAPI) UpdateJourneyV1 ¶
func (api *JourneyAPI) UpdateJourneyV1(ctx context.Context, req *desc.UpdateJourneyRequestV1) (*emptypb.Empty, error)
UpdateJourneyV1 - find journey by id and update another fields