Documentation ¶
Overview ¶
Package db manages all the interactions related to the database.
Copyright © 2021 Alan Rojas alandavidrl11@gmail.com
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.
Package db manages all the interactions related to the database.
Copyright © 2021 Alan Rojas alandavidrl11@gmail.com
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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BucketExists ¶
BucketExists returns whether a Bucket exists
func CreateCategory ¶
CreateCategory creates a nested bucket within the main database bucket
func CreateTask ¶
CreateTask adds done task to it's proper category
Types ¶
type Category ¶
type Category struct {
Key string `json:"category"`
}
Category is the representation of a nested bucket that holds tasks
func ListCategories ¶
ListCategories returns a list of all the buckets in database
type JSONCategory ¶
JSONCategory holds a slice of tasks as the only key. It is also the representation of a JSON schema of categories and their tasks.
func ExportData ¶
func ExportData() ([]JSONCategory, error)
ExportData returns JSON data from all database data