Documentation
¶
Index ¶
- type Cache
- func (cache *Cache) CSVExists(path string, opts minio.StatObjectOptions) (*minio.ObjectInfo, error)
- func (cache *Cache) DataExists(path string, opts minio.StatObjectOptions) (*minio.ObjectInfo, error)
- func (cache *Cache) GetCSV(path string, opts minio.GetObjectOptions) ([][]string, error)
- func (cache *Cache) GetJSON(path string, output interface{}, opts minio.GetObjectOptions) error
- func (cache *Cache) GetPROTO(path string, data proto.Message, unmarshalOpts *proto.UnmarshalOptions, ...) error
- func (cache *Cache) JSONExists(path string, opts minio.StatObjectOptions) (*minio.ObjectInfo, error)
- func (cache *Cache) PROTOExists(path string, opts minio.StatObjectOptions) (*minio.ObjectInfo, error)
- func (cache *Cache) PutCSV(path string, records [][]string, opts minio.PutObjectOptions) error
- func (cache *Cache) PutJSON(path string, data interface{}, opts minio.PutObjectOptions) error
- func (cache *Cache) PutPROTO(path string, data proto.Message, marshalOpts *proto.MarshalOptions, ...) error
- func (cache *Cache) ReadData(path string, opts minio.GetObjectOptions) ([]byte, error)
- func (cache *Cache) WriteData(path string, data []byte, opts minio.PutObjectOptions) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a basic wrapper around minio.Client with support for storing Protobuf, JSON or CSV files.
func New ¶
func New(ctx context.Context, logger *zap.Logger, bucketName, address, accessKey, accessSecret, token string, useSSL bool) (*Cache, error)
New creates a Cache instance using the given configuration
func NewFromURL ¶
NewFromURL creates a new instance using a connection url: > http(s)://<user>:<password>@<host>/<bucket>?token=<token>
func (*Cache) DataExists ¶
func (cache *Cache) DataExists(path string, opts minio.StatObjectOptions) (*minio.ObjectInfo, error)
DataExists checks to see if the given path exists
func (*Cache) GetPROTO ¶
func (cache *Cache) GetPROTO(path string, data proto.Message, unmarshalOpts *proto.UnmarshalOptions, opts minio.GetObjectOptions) error
GetPROTO reads a PROTO file from minio
func (*Cache) JSONExists ¶
func (cache *Cache) JSONExists(path string, opts minio.StatObjectOptions) (*minio.ObjectInfo, error)
JSONExists checks if JSON file exists in minio
func (*Cache) PROTOExists ¶
func (cache *Cache) PROTOExists(path string, opts minio.StatObjectOptions) (*minio.ObjectInfo, error)
PROTOExists checks if PROTO file exists in minio
func (*Cache) PutPROTO ¶
func (cache *Cache) PutPROTO(path string, data proto.Message, marshalOpts *proto.MarshalOptions, opts minio.PutObjectOptions) error
PutPROTO writes a PROTO file to minio
Click to show internal directories.
Click to hide internal directories.