func (db *Redis) GetLink(id string) (models.Link, error) {

	storedLink := models.Link{}

	linkRaw, err := db.store.Get(id).Bytes()
	if err == redis.Nil {
		return models.Link{}, tkerrors.ErrEntityNotFound
	}
	if err != nil {
		return models.Link{}, err
	}

	err = json.Unmarshal(linkRaw, &storedLink)
	if err != nil {
		return models.Link{}, err
	}

	return storedLink, nil
}
// GetLink returns a link by short name
GetLink returns a link by short name
// GetLink returns a link by short name
func (db *Redis) GetLink(id string) (models.Link, error) {
	storedLink := models.Link{}
	linkRaw, err := db.store.Get(id).Bytes()
	if err == redis.Nil {
		return models.Link{}, tkerrors.ErrEntityNotFound
	}
	if err != nil {
		return models.Link{}, err
	}
	err = json.Unmarshal(linkRaw, &storedLink)
	if err != nil {
		return models.Link{}, err
	}
	return storedLink, nil
}
func ( db * Redis ) GetLink ( id string ) ( models . Link , error ) { storedLink := models . Link { } linkRaw , err := db . store . Get ( id ) . Bytes ( ) if err == redis . Nil { return models . Link { } , tkerrors . ErrEntityNotFound } if err != nil { return models . Link { } , err } err = json . Unmarshal ( linkRaw , & storedLink ) if err != nil { return models . Link { } , err } return storedLink , nil }
GetLink returns a link by short name
GetLink returns a link by short name