Documentation ¶
Overview ¶
Copyright 2020 gorse Project Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 gorse Project Authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 gorse Project Authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- type Database
- type NoDatabase
- func (NoDatabase) Close() error
- func (NoDatabase) GetInt(prefix, name string) (int, error)
- func (NoDatabase) GetList(prefix, name string, begin int, end int) ([]string, error)
- func (NoDatabase) GetString(prefix, name string) (string, error)
- func (NoDatabase) SetInt(prefix, name string, val int) error
- func (NoDatabase) SetList(prefix, name string, items []string) error
- func (NoDatabase) SetString(prefix, name string, val string) error
- type Redis
- func (redis *Redis) Close() error
- func (redis *Redis) GetInt(prefix, name string) (int, error)
- func (redis *Redis) GetList(prefix, name string, begin, end int) ([]string, error)
- func (redis *Redis) GetString(prefix, name string) (string, error)
- func (redis *Redis) SetInt(prefix, name string, val int) error
- func (redis *Redis) SetList(prefix, name string, items []string) error
- func (redis *Redis) SetString(prefix, name string, val string) error
Constants ¶
const ( PopularItems = "popular_items" LatestItems = "latest_items" SimilarItems = "similar_items" CollaborativeItems = "collaborative_items" SubscribeItems = "subscribe_items" GlobalMeta = "global_meta" CollectPopularTime = "last_update_popular_time" CollectLatestTime = "last_update_latest_time" CollectSimilarTime = "last_update_similar_time" FitMatrixFactorizationTime = "last_fit_match_model_time" FitFactorizationMachineTime = "last_fit_rank_model_time" MatrixFactorizationVersion = "latest_match_model_version" FactorizationMachineVersion = "latest_rank_model_version" LastActiveTime = "last_active_time" LastUpdateRecommendTime = "last_update_recommend_time" NumUsers = "num_users" NumItems = "num_items" NumPositiveFeedback = "num_pos_feedback" )
Variables ¶
var ErrNoDatabase = fmt.Errorf("no database specified")
var ErrObjectNotExist = fmt.Errorf("object not exists")
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { Close() error SetList(prefix, name string, items []string) error GetList(prefix, name string, begin int, end int) ([]string, error) GetString(prefix, name string) (string, error) SetString(prefix, name string, val string) error GetInt(prefix, name string) (int, error) SetInt(prefix, name string, val int) error }
type NoDatabase ¶
type NoDatabase struct{}
func (NoDatabase) Close ¶
func (NoDatabase) Close() error