services

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 29 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectMixinBlaze

func ConnectMixinBlaze(clientId, sessionId, sessionKey string) (*websocket.Conn, error)

func StartWxPaymentWatch

func StartWxPaymentWatch(name string, db *durable.Database)

Types

type Attachment

type Attachment struct {
	AttachmentId string `json:"attachment_id"`
}

type BlazeMessage

type BlazeMessage struct {
	Id     string                 `json:"id"`
	Action string                 `json:"action"`
	Params map[string]interface{} `json:"params,omitempty"`
	Data   interface{}            `json:"data,omitempty"`
	Error  *session.Error         `json:"error,omitempty"`
}

type Event

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

func (Event) Finalize

func (event Event) Finalize(err error) error

type EventFactory

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

func NewEventFactory

func NewEventFactory(size int64) *EventFactory

func (*EventFactory) Get

func (factory *EventFactory) Get() Event

func (*EventFactory) Insight

func (factory *EventFactory) Insight() string

func (*EventFactory) InsightRoutine

func (factory *EventFactory) InsightRoutine(logger *durable.Logger, tag string)

type Hub

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

func NewHub

func NewHub(db *durable.Database) *Hub

func (*Hub) StartService

func (hub *Hub) StartService(name string) error

type MessageContext

type MessageContext struct {
	Transactions   *tmap
	ReadDone       chan bool
	WriteDone      chan bool
	DistributeDone chan bool
	ReadBuffer     chan MessageView
	WriteBuffer    chan []byte
	RecipientId    map[string]time.Time
}

type MessageService

type MessageService struct{}

func (*MessageService) Run

func (service *MessageService) Run(ctx context.Context) error

type MessageView

type MessageView struct {
	ConversationId string    `json:"conversation_id"`
	UserId         string    `json:"user_id"`
	MessageId      string    `json:"message_id"`
	QuoteMessageId string    `json:"quote_message_id"`
	Category       string    `json:"category"`
	Data           string    `json:"data"`
	Status         string    `json:"status"`
	Source         string    `json:"source"`
	CreatedAt      time.Time `json:"created_at"`
	UpdatedAt      time.Time `json:"updated_at"`
}

type Service

type Service interface {
	Run(context.Context) error
}

type TransferView

type TransferView struct {
	Type          string    `json:"type"`
	SnapshotId    string    `json:"snapshot_id"`
	CounterUserId string    `json:"counter_user_id"`
	AssetId       string    `json:"asset_id"`
	Amount        string    `json:"amount"`
	TraceId       string    `json:"trace_id"`
	Memo          string    `json:"memo"`
	CreatedAt     time.Time `json:"created_at"`
}

type WxPaymentService

type WxPaymentService struct{}

Jump to

Keyboard shortcuts

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