Documentation ¶
Overview ¶
Copyright 2014 Google Inc. All rights reserved. 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 writing, software distributed under the License is distributed on a "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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskManager ¶
type TaskManager struct {
// contains filtered or unexported fields
}
TaskManager manages a list of tasks in a sql database.
func NewTaskManager ¶
func NewTaskManager(driver, datasource string) (*TaskManager, error)
NewTaskManager returns a TaskManager with a sql database setup and configured.
func (*TaskManager) Delete ¶
func (t *TaskManager) Delete(id int64) error
Delete deltes the Task with the given id in the database.
func (*TaskManager) Find ¶
func (t *TaskManager) Find(id int64) (*Task, error)
Find returns the Task with the given id in the database.
func (*TaskManager) List ¶
func (t *TaskManager) List() ([]*Task, error)
All returns the list of all the Tasks in the database.
func (*TaskManager) Save ¶
func (t *TaskManager) Save(task *Task) error
Save saves the given Task in the database.
func (*TaskManager) Update ¶
func (t *TaskManager) Update(task *Task) error
Update updates the given Task in the database.