Documentation ¶
Index ¶
- Variables
- func CreateDataInfo(rdb redis.Pipeliner, ctx context.Context, key string)
- func Exists(database Nodedatabase, key string, field string) (exists bool, err error)
- func Health() (string, error)
- func New(dababaseName Nodedatabase) (Client *redis.Client, err error)
- func UpdateDataInfo(rdb redis.Pipeliner, ctx context.Context, key string)
- func UpdateDataStatus(rdb redis.Pipeliner, ctx context.Context, key string, status status.Status)
- type DataInfo
- type Nodedatabase
Constants ¶
This section is empty.
Variables ¶
View Source
var Client *redis.Client
View Source
var ConnectString string = "redis"
View Source
var Port string = "6379"
Functions ¶
func CreateDataInfo ¶
func New ¶
func New(dababaseName Nodedatabase) (Client *redis.Client, err error)
* * @param: Addr {string}: o nome redis é a referencia para o container do redis. Deve-se trocar 127.0.0.7 pelo nome do container
func UpdateDataInfo ¶
Types ¶
type DataInfo ¶
type DataInfo struct { Status status.Status `json:"status,omitempty" redis:"status,omitempty"` CreatedAt string `json:"created_at,omitempty" redis:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty" redis:"updated_at,omitempty"` }
func GetDataInfo ¶
func GetDataInfo(database Nodedatabase, key string) (dataInfo *DataInfo, err error)
type Nodedatabase ¶
type Nodedatabase int
const ( Bridge Nodedatabase = 0 UserDatabase Nodedatabase = 1 PermissionDatabase Nodedatabase = 1 AddressDatabase Nodedatabase = 1 AccountDatabase Nodedatabase = 1 ProductDatabase Nodedatabase = 2 CategoryDatabase Nodedatabase = 2 ShopCartDatabase Nodedatabase = 2 FreightDatabase Nodedatabase = 2 )
Click to show internal directories.
Click to hide internal directories.