Documentation ¶
Index ¶
- Variables
- type Item
- type Service
- type SpannerService
- func (s *SpannerService) Delete(ctx context.Context, key string) error
- func (s *SpannerService) DeleteBySurrogateKey(ctx context.Context, surrogateKey string) error
- func (s *SpannerService) DeleteMulti(ctx context.Context, keys []string) error
- func (s *SpannerService) DeleteMultiBySurrogateKey(ctx context.Context, surrogateKeys []string) error
- func (s *SpannerService) FlushAll(ctx context.Context) error
- func (s *SpannerService) Get(ctx context.Context, key string) (*Item, error)
- func (s *SpannerService) GetBySurrogateKey(ctx context.Context, surrogateKey string) ([]*Item, error)
- func (s *SpannerService) GetMulti(ctx context.Context, keys []string) (map[string]*Item, error)
- func (s *SpannerService) Set(ctx context.Context, item *Item) error
- func (s *SpannerService) SetMulti(ctx context.Context, items []*Item) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrCacheMiss is Cacheに存在しない時に返す ErrCacheMiss = errors.New("mole: cache miss") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { Get(ctx context.Context, key string) (*Item, error) GetBySurrogateKey(ctx context.Context, surrogateKey string) ([]*Item, error) GetMulti(ctx context.Context, keys []string) (map[string]*Item, error) Set(ctx context.Context, item *Item) error SetMulti(ctx context.Context, items []*Item) error Delete(ctx context.Context, key string) error DeleteBySurrogateKey(ctx context.Context, surrogateKey string) error DeleteMulti(ctx context.Context, keys []string) error DeleteMultiBySurrogateKey(ctx context.Context, surrogateKeys []string) error FlushAll(ctx context.Context) error }
func NewService ¶
type SpannerService ¶
type SpannerService struct { }
func (*SpannerService) Delete ¶
func (s *SpannerService) Delete(ctx context.Context, key string) error
func (*SpannerService) DeleteBySurrogateKey ¶
func (s *SpannerService) DeleteBySurrogateKey(ctx context.Context, surrogateKey string) error
func (*SpannerService) DeleteMulti ¶
func (s *SpannerService) DeleteMulti(ctx context.Context, keys []string) error
func (*SpannerService) DeleteMultiBySurrogateKey ¶
func (s *SpannerService) DeleteMultiBySurrogateKey(ctx context.Context, surrogateKeys []string) error
func (*SpannerService) GetBySurrogateKey ¶
Click to show internal directories.
Click to hide internal directories.