service

package
v0.0.0-...-35f8ccf Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomerOSService

type CustomerOSService interface {
	CreateInteractionEvent(options ...EventOption) (*model.InteractionEventCreateResponse, error)
	CreateInteractionSession(options ...SessionOption) (*string, error)
	ForwardQuery(tenant, query *string) ([]byte, error)
	CreateMeeting(input cosModel.MeetingInput, user *string) (*string, error)
	UpdateMeeting(meetingId string, input cosModel.MeetingUpdateInput, user *string) (*string, error)
	ExternalMeeting(externalSystemId string, externalId string, user *string) (*model.ExternalMeeting, error)
	MeetingLinkAttendedBy(meetingId string, participant cosModel.MeetingParticipantInput, user *string) (*string, error)
	MeetingUnLinkAttendedBy(meetingId string, participant cosModel.MeetingParticipantInput, user *string) (*string, error)
	GetUserByEmail(email *string) (*model.GetUserByEmailResponse, error)
	GetContactByEmail(user *string, email *string) (*string, error)

	CreateContact(user *string, email *string) (*string, error)

	GetTenant(user *string) (*model.TenantResponse, error)
	GetInteractionEvent(interactionEventId *string, user *string) (*model.InteractionEventGetResponse, error)
	GetInteractionSession(sessionIdentifier *string, tenant *string, user *string) (*string, error)
	AddAttachmentToInteractionSession(sessionId string, attachmentId string, tenant *string, user *string) (*string, error)
	AddAttachmentToInteractionEvent(eventId string, attachmentId string, tenant *string, user *string) (*string, error)
}

Deprecated - move to CustomerOSApiClient

func NewCustomerOSService

func NewCustomerOSService(graphqlClient *graphql.Client, config *c.Config) CustomerOSService

type EventOption

type EventOption func(*EventOptions)

func WithAppSource

func WithAppSource(value *string) EventOption

func WithChannel

func WithChannel(value *string) EventOption

func WithChannelData

func WithChannelData(ChannelData *string) EventOption

func WithContent

func WithContent(value *string) EventOption

func WithContentType

func WithContentType(value *string) EventOption

func WithCreatedAt

func WithCreatedAt(value *time.Time) EventOption

func WithCustomerOSInternalIdentifier

func WithCustomerOSInternalIdentifier(customerOSInternalIdentifier string) EventOption

func WithEventIdentifier

func WithEventIdentifier(eventIdentifier string) EventOption

func WithEventType

func WithEventType(value *string) EventOption

func WithExternalId

func WithExternalId(externalId string) EventOption

func WithExternalSystemId

func WithExternalSystemId(externalSystemId string) EventOption

func WithMeetingId

func WithMeetingId(value *string) EventOption

func WithRepliesTo

func WithRepliesTo(value *string) EventOption

func WithSessionId

func WithSessionId(value *string) EventOption

func WithTenant

func WithTenant(value *string) EventOption

func WithUsername

func WithUsername(value *string) EventOption

type EventOptions

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

type MailService

type MailService interface {
	SaveMail(ctx context.Context, email *parsemail.Email, tenant, user, customerOSInternalIdentifier string) (*model.InteractionEventCreateResponse, error)
	SendMail(ctx context.Context, request *model.MailReplyRequest, username *string) (*parsemail.Email, error)
}

func NewMailService

func NewMailService(config *c.Config, services *Services) MailService

type RedisService

type RedisService interface {
	GetKeyInfo(ctx context.Context, tag, key string) (bool, *string)
}

func NewRedisService

func NewRedisService(redisClient *redis.Client, config *c.Config) RedisService

type Services

type Services struct {
	AuthServices *authService.Services

	CustomerOsService   CustomerOSService
	CustomerOSApiClient service.CustomerOSApiClient

	MailService MailService

	RedisService        RedisService
	FileStoreApiService fsc.FileStoreApiService
	CommonServices      *commonService.Services
}

func InitServices

func InitServices(graphqlClient *graphql.Client, redisClient *redis.Client, cfg *c.Config, db *gorm.DB, driver *neo4j.DriverWithContext, neo4jDatabase string) *Services

type SessionOption

type SessionOption func(*SessionOptions)

func WithSessionAppSource

func WithSessionAppSource(value *string) SessionOption

func WithSessionChannel

func WithSessionChannel(value *string) SessionOption

func WithSessionIdentifier

func WithSessionIdentifier(value *string) SessionOption

func WithSessionName

func WithSessionName(value *string) SessionOption

func WithSessionStatus

func WithSessionStatus(value *string) SessionOption

func WithSessionTenant

func WithSessionTenant(value *string) SessionOption

func WithSessionType

func WithSessionType(value *string) SessionOption

func WithSessionUsername

func WithSessionUsername(value *string) SessionOption

type SessionOptions

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

Jump to

Keyboard shortcuts

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