refine comments for for four files (#5011)

* refine comments for cache.go

* refine comments for log.go

* Update orm.go

* refine comments for orm_log.go,types.go

* Update utils.go

* Update doc.go

* Update db.go
This commit is contained in:
Regan Yue
2022-07-09 18:10:19 +08:00
committed by GitHub
parent 49be2581d1
commit 493e7db20b
4 changed files with 31 additions and 31 deletions

12
client/cache/cache.go vendored
View File

@@ -53,21 +53,21 @@ type Cache interface {
Get(ctx context.Context, key string) (interface{}, error)
// GetMulti is a batch version of Get.
GetMulti(ctx context.Context, keys []string) ([]interface{}, error)
// Set a cached value with key and expire time.
// Put Set a cached value with key and expire time.
Put(ctx context.Context, key string, val interface{}, timeout time.Duration) error
// Delete cached value by key.
// Should not return error if key not found
Delete(ctx context.Context, key string) error
// Increment a cached int value by key, as a counter.
// Incr Increment a cached int value by key, as a counter.
Incr(ctx context.Context, key string) error
// Decrement a cached int value by key, as a counter.
// Decr Decrement a cached int value by key, as a counter.
Decr(ctx context.Context, key string) error
// Check if a cached value exists or not.
// IsExist Check if a cached value exists or not.
// if key is expired, return (false, nil)
IsExist(ctx context.Context, key string) (bool, error)
// Clear all cache.
// ClearAll Clear all cache.
ClearAll(ctx context.Context) error
// Start gc routine based on config string settings.
// StartAndGC Start gc routine based on config string settings.
StartAndGC(config string) error
}