Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sheet ¶
type Sheet interface {
// GetRecord fetches a single record from the sheet, the passed struct must have its UID field filled, or it returns an error
GetRecord(ctx context.Context, out interface{}) error
// GetAllRecords returns all valid records from the the sheet, the argument must be a list of structs
GetAllRecords(ctx context.Context, out interface{}) error
// UpdateRecords take individual records, or list of records, or both as vararg. The UID field of each record must be filled, otherwise it returns an error
UpdateRecords(ctx context.Context, records ...interface{}) error
}
type SheetImpl ¶
type SheetImpl struct {
// contains filtered or unexported fields
}
func NewSheet ¶
func NewSheet(srv *sheets.Service, st StructureConfig, opts ...SheetInitializationOption) (*SheetImpl, error)
func (*SheetImpl) GetAllRecords ¶
type SheetInitializationOption ¶
type SheetInitializationOption func(*SheetImpl)
func WithLogger ¶
func WithLogger(l *zap.Logger) SheetInitializationOption
func WithRowCache ¶
func WithRowCache(c cache.RowCache) SheetInitializationOption
func WithRowUIDCache ¶
func WithRowUIDCache(c cache.RowUIDCache) SheetInitializationOption
type StructureConfig ¶
func (StructureConfig) Validate ¶
func (st StructureConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.