db

package
v0.0.0-...-9de722a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_ID = 777000

Variables

View Source
var SESSION *gorm.DB

Functions

func LoadDB

func LoadDB(log *logger.Logger)

func SaveConfig

func SaveConfig(config []byte)

Types

type ApiService

type ApiService struct {
	ApiKey string `json:"api_key,omitempty"`
	Local  bool   `json:"local,omitempty"`
}

type App

type App struct {
	Name        string `json:"name,omitempty"`
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	Domain      string `json:"domain,omitempty"`
	SecretKey   string `json:"secret_key,omitempty"`
}

{"auth0":{},"categories":[],"gdrive":{},"onedrive":{},"sharepoint":{},"tmdb":{"api_key":"ygy"},"subtitles":{"api_key":"gyg"},"build":{"cron":"gygy"},"rclone":{},"app":{"name":"feuh","title":"uhuhu","description":"hu","domain":"huh","secret_key":"uhhu"}}

type Auth0

type Auth0 struct {
	Domain       string `json:"domain,omitempty"`
	ClientId     string `json:"client_id,omitempty"`
	ClientSecret string `json:"client_secret,omitempty"`
}

type Build

type Build struct {
	Cron string `json:"cron,omitempty"`
}

type Category

type Category struct {
	Adult   bool   `json:"adult,omitempty"`
	Anime   bool   `json:"anime,omitempty"`
	Name    string `json:"name,omitempty"`
	Id      string `json:"id,omitempty"`
	DriveId string `json:"drive_id,omitempty"`
}

type Config

type Config struct {
	Auth0      Auth0      `json:"auth0"`
	App        App        `json:"app"`
	Gdrive     Hosting    `json:"gdrive"`
	Sharepoint Hosting    `json:"sharepoint"`
	Onedrive   Hosting    `json:"onedrive"`
	Tmdb       ApiService `json:"tmdb"`
	Subtitles  ApiService `json:"subtitles"`
	Rclone     Rclone     `json:"rclone"`
	Build      Build      `json:"build"`
	Categories []Category `json:"categories,omitempty"`
}

func GetConfig

func GetConfig() *Config

func (*Config) Json

func (c *Config) Json() (b []byte)

type ConfigDB

type ConfigDB struct {
	Id     int `gorm:"primary_key"`
	Config []byte
}

type Hosting

type Hosting struct {
	ClientId     string `json:"client_id,omitempty"`
	ClientSecret string `json:"client_secret,omitempty"`
	AccessToken  string `json:"access_token,omitempty"`
	RefreshToken string `json:"refresh_token,omitempty"`
}

type Rclone

type Rclone struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL