Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface {
Model(model ...interface{}) *orm.Query
Select(model interface{}) error
Insert(model ...interface{}) error
Update(model interface{}) error
Delete(model interface{}) error
Exec(query interface{}, params ...interface{}) (*types.Result, error)
ExecOne(query interface{}, params ...interface{}) (*types.Result, error)
Query(coll, query interface{}, params ...interface{}) (*types.Result, error)
QueryOne(coll, query interface{}, params ...interface{}) (*types.Result, error)
Begin() (*pg.Tx, error)
Close() error
}
DB represents the contract for a Postgres DB
type KafkaConsumerClient ¶
type KafkaConsumerClient interface {
SubscribeTopics([]string, kafka.RebalanceCb) error
Events() chan kafka.Event
Assign([]kafka.TopicPartition) error
Unassign() error
Close() error
}
KafkaConsumerClient interface
type PushProducer ¶
type PushProducer interface {
SendAPNSPush(topic, deviceToken string, payload, messageMetadata map[string]interface{}, pushMetadata map[string]interface{}, pushExpiry int64, templateName string) error
SendGCMPush(topic, deviceToken string, payload, messageMetadata map[string]interface{}, pushMetadata map[string]interface{}, pushExpiry int64, templateName string) error
}
PushProducer interface
type Queue ¶
type Queue interface {
MessagesChannel() *chan []byte
ConsumeLoop() error
StopConsuming()
PendingMessagesWaitGroup() *sync.WaitGroup
}
Queue interface for making new queues pluggable easily
type S3 ¶
type S3 interface {
InitMultipartUpload(path string) (*s3.CreateMultipartUploadOutput, error)
PutObject(path string, body *[]byte) (*s3.PutObjectOutput, error)
GetObject(path string) ([]byte, error)
UploadPart(input *bytes.Buffer, multipartUpload *s3.CreateMultipartUploadOutput,
partNumber int64) (*s3.UploadPartOutput, error)
PutObjectRequest(path string) (string, error)
CompleteMultipartUpload(multipartUpload *s3.CreateMultipartUploadOutput, parts []*s3.CompletedPart) error
DownloadChunk(start, size int64, path string) (int, *bytes.Buffer, error)
}
S3 represents the contract for a amazom S3
Click to show internal directories.
Click to hide internal directories.