Documentation ¶
Index ¶
- func NewMetaRepository() repository.MetaRepository
- func NewS3Client(region string) adaptor.S3Client
- func NewSQSClient(region string) adaptor.SQSClient
- type ChunkMockDB
- func (x *ChunkMockDB) DeleteChunk(chunk *models.Chunk) (*models.Chunk, error)
- func (x *ChunkMockDB) FreezeChunk(chunk *models.Chunk) (*models.Chunk, error)
- func (x *ChunkMockDB) GetMergableChunks(schema string, createdBefore time.Time, minChunkSize int64) ([]*models.Chunk, error)
- func (x *ChunkMockDB) GetWritableChunks(schema, partition string, writableTotalSize int64) ([]*models.Chunk, error)
- func (x *ChunkMockDB) PutChunk(recordID string, objSize int64, schema, partition string, created time.Time) error
- func (x *ChunkMockDB) UpdateChunk(chunk *models.Chunk, recordID string, objSize, writableSize int64) error
- type MetaRepository
- func (x *MetaRepository) GetObjecID(s3path string) (int64, error)
- func (x *MetaRepository) GetRecordObjects(recordIDs []string, schema models.ParquetSchemaName) ([]*repository.MetaRecordObject, error)
- func (x *MetaRepository) HeadPartition(partitionKey string) (bool, error)
- func (x *MetaRepository) PutPartition(partitionKey string) error
- func (x *MetaRepository) PutRecordObjects(objects []*repository.MetaRecordObject) error
- type S3Client
- func (x *S3Client) DeleteObjects(input *s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error)
- func (x *S3Client) GetObject(input *s3.GetObjectInput) (*s3.GetObjectOutput, error)
- func (x *S3Client) HeadObject(input *s3.HeadObjectInput) (*s3.HeadObjectOutput, error)
- func (x *S3Client) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error)
- func (x *S3Client) Upload(bucket, key string, body io.Reader, encoding string) error
- type SQSClient
- type SQSClientFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetaRepository ¶
func NewMetaRepository() repository.MetaRepository
func NewS3Client ¶
NewS3Client is constructor of S3 Mock
func NewSQSClient ¶
NewSQSClient creates mock SQS client
Types ¶
type ChunkMockDB ¶
ChunkMockDB is mock of ChunkDynamoDB
func NewChunkMockDB ¶
func NewChunkMockDB() *ChunkMockDB
NewChunkMockDB is constructor of ChunkMockDB
func (*ChunkMockDB) DeleteChunk ¶
func (*ChunkMockDB) FreezeChunk ¶
func (*ChunkMockDB) GetMergableChunks ¶
func (x *ChunkMockDB) GetMergableChunks(schema string, createdBefore time.Time, minChunkSize int64) ([]*models.Chunk, error)
GetMergableChunks returns mergable chunks exceeding freezedAt or minChunkSize
func (*ChunkMockDB) GetWritableChunks ¶
func (x *ChunkMockDB) GetWritableChunks(schema, partition string, writableTotalSize int64) ([]*models.Chunk, error)
GetWritableChunks returns writable chunks for now (because chunks are not locked)
func (*ChunkMockDB) PutChunk ¶
func (x *ChunkMockDB) PutChunk(recordID string, objSize int64, schema, partition string, created time.Time) error
PutChunk saves a new chunk into DB. The chunk must be overwritten by UUID.
func (*ChunkMockDB) UpdateChunk ¶
type MetaRepository ¶
type MetaRepository struct {
// contains filtered or unexported fields
}
func (*MetaRepository) GetObjecID ¶
func (x *MetaRepository) GetObjecID(s3path string) (int64, error)
func (*MetaRepository) GetRecordObjects ¶
func (x *MetaRepository) GetRecordObjects(recordIDs []string, schema models.ParquetSchemaName) ([]*repository.MetaRecordObject, error)
func (*MetaRepository) HeadPartition ¶
func (x *MetaRepository) HeadPartition(partitionKey string) (bool, error)
func (*MetaRepository) PutPartition ¶
func (x *MetaRepository) PutPartition(partitionKey string) error
func (*MetaRepository) PutRecordObjects ¶
func (x *MetaRepository) PutRecordObjects(objects []*repository.MetaRecordObject) error
type S3Client ¶
type S3Client struct {
// contains filtered or unexported fields
}
S3Client is on memory S3Client mock
func (*S3Client) DeleteObjects ¶
func (x *S3Client) DeleteObjects(input *s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error)
DeleteObjects of S3Client remove []bytes from memory
func (*S3Client) GetObject ¶
func (x *S3Client) GetObject(input *s3.GetObjectInput) (*s3.GetObjectOutput, error)
GetObject of S3Client loads []bytes from memory
func (*S3Client) HeadObject ¶
func (x *S3Client) HeadObject(input *s3.HeadObjectInput) (*s3.HeadObjectOutput, error)
func (*S3Client) PutObject ¶
func (x *S3Client) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error)
PutObject of S3Client saves []bytes to memory
type SQSClient ¶
type SQSClient struct { Input []*sqs.SendMessageInput Region string // contains filtered or unexported fields }
SQSClient is mock of AWS SQS SDK
func (*SQSClient) DeleteMessage ¶
func (x *SQSClient) DeleteMessage(input *sqs.DeleteMessageInput) (*sqs.DeleteMessageOutput, error)
func (*SQSClient) ReceiveMessage ¶
func (x *SQSClient) ReceiveMessage(input *sqs.ReceiveMessageInput) (*sqs.ReceiveMessageOutput, error)
func (*SQSClient) SendMessage ¶
func (x *SQSClient) SendMessage(input *sqs.SendMessageInput) (*sqs.SendMessageOutput, error)
SendMessage of mock just stores SendMessage input
type SQSClientFactory ¶
SQSClientFactory is interface SQSClient constructor