Documentation ¶
Overview ¶
Copyright 2023 Oscar Triano García 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 manager Copyright 2023 Oscar Triano García 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 manager
Create database if not exists Check database
Copyright 2023 Oscar Triano García 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 manager Copyright 2023 Oscar Triano García 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 manager Copyright 2023 Oscar Triano García 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 manager
Index ¶
- Constants
- Variables
- func AddCSS(db *sql.DB, filename string) error
- func AddCategoriesToPost(db *sql.DB, filename string, categories common.Tags) error
- func AddCategory(db *sql.DB, name string) error
- func AddPost(db *sql.DB, filename, title string) error
- func AddScript(db *sql.DB, filename string) error
- func AddTag(db *sql.DB, name string) error
- func AddTagsToPost(db *sql.DB, filename string, tags common.Tags) error
- func CreateTree(path string) error
- func DoesStringExistIn(db *sql.DB, table, column, value string) (bool, error)
- func GetCSS(db *sql.DB) ([]string, error)
- func GetCategories(db *sql.DB) ([]string, error)
- func GetCategoriesFromPost(db *sql.DB, filename string) ([]string, error)
- func GetLang(db *sql.DB) (string, error)
- func GetLicense(db *sql.DB) (string, error)
- func GetPathDB(path string) string
- func GetPostsPerPage(db *sql.DB) (int64, error)
- func GetScripts(db *sql.DB) ([]string, error)
- func GetTagsFromPost(db *sql.DB, filename string) ([]string, error)
- func GetTitle(db *sql.DB) (string, error)
- func InsertStringInto(db *sql.DB, table, column, value string) error
- func OpenDatabase(path string) (*sql.DB, error)
- func RemoveCSS(db *sql.DB, filename string) error
- func RemoveCategoriesFromPost(db *sql.DB, filename string, tags common.Tags) error
- func RemoveCategory(db *sql.DB, name string) error
- func RemovePost(db *sql.DB, filename string) error
- func RemoveScript(db *sql.DB, filename string) error
- func RemoveStringFrom(db *sql.DB, table, column, value string) error
- func RemoveTag(db *sql.DB, name string) error
- func RemoveTagsFromPost(db *sql.DB, filename string, tags common.Tags) error
- func SelectAllStringsFrom(db *sql.DB, table, column string) ([]string, error)
- func SetLang(db *sql.DB, lang string) error
- func SetLicense(db *sql.DB, license string) error
- func SetPostsPerPage(db *sql.DB, postsPerPage int64) error
- func SetTitle(db *sql.DB, title string) error
- func UpdatePostTitleByFilename(db *sql.DB, filename, title string) error
- type Config
- type Post
- type PostsPage
- type PostsPages
Constants ¶
View Source
const DB = "index.db"
Variables ¶
View Source
var CSS_PATH string = filepath.Join("assets", "css")
View Source
var IMAGES_PATH string = filepath.Join("assets", "images")
View Source
var SCRIPTS_PATH string = filepath.Join("assets", "scripts")
Functions ¶
func AddCategoriesToPost ¶
func CreateTree ¶
func DoesStringExistIn ¶
func GetCategoriesFromPost ¶
func RemoveTagsFromPost ¶
func SelectAllStringsFrom ¶
Types ¶
type Post ¶
type Post struct { Filename string Title string Date time.Time // contains filtered or unexported fields }
type PostsPages ¶
type PostsPages struct {
// contains filtered or unexported fields
}
func GetPostsPages ¶
func (*PostsPages) GetPostsFromCurrentPage ¶
func (pp *PostsPages) GetPostsFromCurrentPage(db *sql.DB) (PostsPage, error)
func (PostsPages) Next ¶
func (pp PostsPages) Next() bool
Click to show internal directories.
Click to hide internal directories.