Documentation ¶
Index ¶
- Variables
- func CustomClientOptions(URI string) *options.ClientOptions
- type Connector
- type Document
- type Download
- type DownloadQuery
- func (q *DownloadQuery) Asc(field string) *DownloadQuery
- func (q *DownloadQuery) Desc(field string) *DownloadQuery
- func (q *DownloadQuery) GreaterThan(key string, value interface{}) *DownloadQuery
- func (q *DownloadQuery) GreaterThanEqual(key string, value interface{}) *DownloadQuery
- func (q *DownloadQuery) In(key string, value interface{}) *DownloadQuery
- func (q *DownloadQuery) LessThan(key string, value interface{}) *DownloadQuery
- func (q *DownloadQuery) LessThanEqual(key string, value interface{}) *DownloadQuery
- func (q *DownloadQuery) Limit(limit int) *DownloadQuery
- func (q *DownloadQuery) NotEqual(key string, value interface{}) *DownloadQuery
- func (q *DownloadQuery) NotIn(key string, value interface{}) *DownloadQuery
- func (q *DownloadQuery) Run() ([]Download, error)
- func (q *DownloadQuery) Skip(skip int) *DownloadQuery
- func (q *DownloadQuery) Where(key string, value interface{}) *DownloadQuery
- type DownloadSchema
- type DownloadStore
- func (s *DownloadStore) Active() ([]Download, error)
- func (s *DownloadStore) Delete(o *Download) error
- func (s *DownloadStore) Find(id string) (*Download, error)
- func (s *DownloadStore) FindByID(id primitive.ObjectID) (*Download, error)
- func (s *DownloadStore) Query() *DownloadQuery
- func (s *DownloadStore) Save(o *Download) error
- func (s *DownloadStore) Update(o *Download) error
- type FieldSchema
- type GolemSchema
- type Medium
- type MediumQuery
- func (q *MediumQuery) Asc(field string) *MediumQuery
- func (q *MediumQuery) Desc(field string) *MediumQuery
- func (q *MediumQuery) GreaterThan(key string, value interface{}) *MediumQuery
- func (q *MediumQuery) GreaterThanEqual(key string, value interface{}) *MediumQuery
- func (q *MediumQuery) In(key string, value interface{}) *MediumQuery
- func (q *MediumQuery) LessThan(key string, value interface{}) *MediumQuery
- func (q *MediumQuery) LessThanEqual(key string, value interface{}) *MediumQuery
- func (q *MediumQuery) Limit(limit int) *MediumQuery
- func (q *MediumQuery) NotEqual(key string, value interface{}) *MediumQuery
- func (q *MediumQuery) NotIn(key string, value interface{}) *MediumQuery
- func (q *MediumQuery) Run() ([]Medium, error)
- func (q *MediumQuery) Skip(skip int) *MediumQuery
- func (q *MediumQuery) Where(key string, value interface{}) *MediumQuery
- type MediumSchema
- type MediumStore
- func (s *MediumStore) Delete(o *Medium) error
- func (s *MediumStore) Find(id string) (*Medium, error)
- func (s *MediumStore) FindByID(id primitive.ObjectID) (*Medium, error)
- func (s *MediumStore) Query() *MediumQuery
- func (s *MediumStore) Save(o *Medium) error
- func (s *MediumStore) Update(o *Medium) error
- type Release
- type ReleaseQuery
- func (q *ReleaseQuery) Asc(field string) *ReleaseQuery
- func (q *ReleaseQuery) Desc(field string) *ReleaseQuery
- func (q *ReleaseQuery) GreaterThan(key string, value interface{}) *ReleaseQuery
- func (q *ReleaseQuery) GreaterThanEqual(key string, value interface{}) *ReleaseQuery
- func (q *ReleaseQuery) In(key string, value interface{}) *ReleaseQuery
- func (q *ReleaseQuery) LessThan(key string, value interface{}) *ReleaseQuery
- func (q *ReleaseQuery) LessThanEqual(key string, value interface{}) *ReleaseQuery
- func (q *ReleaseQuery) Limit(limit int) *ReleaseQuery
- func (q *ReleaseQuery) NotEqual(key string, value interface{}) *ReleaseQuery
- func (q *ReleaseQuery) NotIn(key string, value interface{}) *ReleaseQuery
- func (q *ReleaseQuery) Run() ([]Release, error)
- func (q *ReleaseQuery) Skip(skip int) *ReleaseQuery
- func (q *ReleaseQuery) Where(key string, value interface{}) *ReleaseQuery
- type ReleaseSchema
- type ReleaseStore
- func (s *ReleaseStore) Delete(o *Release) error
- func (s *ReleaseStore) Find(id string) (*Release, error)
- func (s *ReleaseStore) FindByID(id primitive.ObjectID) (*Release, error)
- func (s *ReleaseStore) Query() *ReleaseQuery
- func (s *ReleaseStore) Save(o *Release) error
- func (s *ReleaseStore) Update(o *Release) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Schema = &GolemSchema{ Download: &DownloadSchema{ MediumId: &FieldSchema{ Name: "medium_id", Type: "primitive.ObjectID", }, Auto: &FieldSchema{ Name: "auto", Type: "bool", }, Multi: &FieldSchema{ Name: "multi", Type: "bool", }, Force: &FieldSchema{ Name: "force", Type: "bool", }, Url: &FieldSchema{ Name: "url", Type: "string", }, ReleaseId: &FieldSchema{ Name: "release_id", Type: "string", }, Thash: &FieldSchema{ Name: "thash", Type: "string", }, Timestamps: &FieldSchema{ Name: "timestamps", Type: "struct", }, Selected: &FieldSchema{ Name: "selected", Type: "string", }, Status: &FieldSchema{ Name: "status", Type: "string", }, Files: &FieldSchema{ Name: "files", Type: "[]struct", }, }, Medium: &MediumSchema{ Type: &FieldSchema{ Name: "type", Type: "string", }, Kind: &FieldSchema{ Name: "kind", Type: "primitive.Symbol", }, Source: &FieldSchema{ Name: "source", Type: "string", }, SourceId: &FieldSchema{ Name: "source_id", Type: "string", }, Title: &FieldSchema{ Name: "title", Type: "string", }, Description: &FieldSchema{ Name: "description", Type: "string", }, Slug: &FieldSchema{ Name: "slug", Type: "string", }, Text: &FieldSchema{ Name: "text", Type: "[]string", }, Display: &FieldSchema{ Name: "display", Type: "string", }, Directory: &FieldSchema{ Name: "directory", Type: "string", }, Search: &FieldSchema{ Name: "search", Type: "string", }, SearchParams: &FieldSchema{ Name: "search_params", Type: "struct", }, Active: &FieldSchema{ Name: "active", Type: "bool", }, Downloaded: &FieldSchema{ Name: "downloaded", Type: "bool", }, Completed: &FieldSchema{ Name: "completed", Type: "bool", }, Skipped: &FieldSchema{ Name: "skipped", Type: "bool", }, Watched: &FieldSchema{ Name: "watched", Type: "bool", }, Broken: &FieldSchema{ Name: "broken", Type: "bool", }, ReleaseDate: &FieldSchema{ Name: "release_date", Type: "time.Time", }, Paths: &FieldSchema{ Name: "paths", Type: "[]struct", }, }, Release: &ReleaseSchema{ Type: &FieldSchema{ Name: "type", Type: "string", }, Source: &FieldSchema{ Name: "source", Type: "string", }, Raw: &FieldSchema{ Name: "raw", Type: "string", }, Title: &FieldSchema{ Name: "title", Type: "string", }, Description: &FieldSchema{ Name: "description", Type: "string", }, Size: &FieldSchema{ Name: "size", Type: "string", }, View: &FieldSchema{ Name: "view", Type: "string", }, Download: &FieldSchema{ Name: "download", Type: "string", }, Infohash: &FieldSchema{ Name: "infohash", Type: "string", }, Name: &FieldSchema{ Name: "name", Type: "string", }, Season: &FieldSchema{ Name: "season", Type: "int", }, Episode: &FieldSchema{ Name: "episode", Type: "int", }, Volume: &FieldSchema{ Name: "volume", Type: "int", }, Checksum: &FieldSchema{ Name: "checksum", Type: "string", }, Group: &FieldSchema{ Name: "group", Type: "string", }, Author: &FieldSchema{ Name: "author", Type: "string", }, Verified: &FieldSchema{ Name: "verified", Type: "bool", }, Widescreen: &FieldSchema{ Name: "widescreen", Type: "bool", }, Uncensored: &FieldSchema{ Name: "uncensored", Type: "bool", }, Bluray: &FieldSchema{ Name: "bluray", Type: "bool", }, Resolution: &FieldSchema{ Name: "resolution", Type: "string", }, Encoding: &FieldSchema{ Name: "encoding", Type: "string", }, Quality: &FieldSchema{ Name: "quality", Type: "string", }, Published: &FieldSchema{ Name: "published", Type: "time.Time", }, }, }
Functions ¶
func CustomClientOptions ¶
func CustomClientOptions(URI string) *options.ClientOptions
Types ¶
type Connector ¶
type Connector struct { Download *DownloadStore Medium *MediumStore Release *ReleaseStore }
func NewConnector ¶
type Download ¶
type Download struct { Document `bson:",inline"` // include mgm.DefaultModel //ID primitive.ObjectID `json:"_id" bson:"_id,omitempty"` //CreatedAt time.Time `json:"created_at" bson:"created_at"` //UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` MediumId primitive.ObjectID `json:"medium_id" bson:"medium_id"` Auto bool `json:"auto" bson:"auto"` Multi bool `json:"multi" bson:"multi"` Force bool `json:"force" bson:"force"` Url string `json:"url" bson:"url"` ReleaseId string `json:"release_id" bson:"tdo_id"` Thash string `json:"thash" bson:"thash"` Timestamps struct { Found time.Time `json:"found" bson:"found"` Loaded time.Time `json:"loaded" bson:"loaded"` Downloaded time.Time `json:"downloaded" bson:"downloaded"` Completed time.Time `json:"completed" bson:"completed"` Deleted time.Time `json:"deleted" bson:"deleted"` } `json:"timestamps" bson:"timestamps"` Selected string `json:"selected" bson:"selected"` Status string `json:"status" bson:"status"` Files []struct { Id primitive.ObjectID `json:"id" bson:"_id"` MediumId primitive.ObjectID `json:"medium_id" bson:"medium_id"` Num int `json:"num" bson:"num"` } `json:"download_files" bson:"download_files"` }
func NewDownload ¶
func NewDownload() *Download
type DownloadQuery ¶
type DownloadQuery struct {
// contains filtered or unexported fields
}
func (*DownloadQuery) Asc ¶
func (q *DownloadQuery) Asc(field string) *DownloadQuery
func (*DownloadQuery) Desc ¶
func (q *DownloadQuery) Desc(field string) *DownloadQuery
func (*DownloadQuery) GreaterThan ¶
func (q *DownloadQuery) GreaterThan(key string, value interface{}) *DownloadQuery
func (*DownloadQuery) GreaterThanEqual ¶
func (q *DownloadQuery) GreaterThanEqual(key string, value interface{}) *DownloadQuery
func (*DownloadQuery) In ¶
func (q *DownloadQuery) In(key string, value interface{}) *DownloadQuery
func (*DownloadQuery) LessThan ¶
func (q *DownloadQuery) LessThan(key string, value interface{}) *DownloadQuery
func (*DownloadQuery) LessThanEqual ¶
func (q *DownloadQuery) LessThanEqual(key string, value interface{}) *DownloadQuery
func (*DownloadQuery) Limit ¶
func (q *DownloadQuery) Limit(limit int) *DownloadQuery
func (*DownloadQuery) NotEqual ¶
func (q *DownloadQuery) NotEqual(key string, value interface{}) *DownloadQuery
func (*DownloadQuery) NotIn ¶
func (q *DownloadQuery) NotIn(key string, value interface{}) *DownloadQuery
func (*DownloadQuery) Run ¶
func (q *DownloadQuery) Run() ([]Download, error)
func (*DownloadQuery) Skip ¶
func (q *DownloadQuery) Skip(skip int) *DownloadQuery
func (*DownloadQuery) Where ¶
func (q *DownloadQuery) Where(key string, value interface{}) *DownloadQuery
type DownloadSchema ¶
type DownloadSchema struct { MediumId *FieldSchema Auto *FieldSchema Multi *FieldSchema Force *FieldSchema Url *FieldSchema ReleaseId *FieldSchema Thash *FieldSchema Timestamps *FieldSchema Selected *FieldSchema Status *FieldSchema Files *FieldSchema }
type DownloadStore ¶
type DownloadStore struct { Client *mongo.Client Database *mongo.Database Collection *mgm.Collection }
func NewDownloadStore ¶
func NewDownloadStore(URI, db, name string) (*DownloadStore, error)
func (*DownloadStore) Active ¶
func (s *DownloadStore) Active() ([]Download, error)
func (*DownloadStore) Delete ¶
func (s *DownloadStore) Delete(o *Download) error
func (*DownloadStore) FindByID ¶
func (s *DownloadStore) FindByID(id primitive.ObjectID) (*Download, error)
func (*DownloadStore) Query ¶
func (s *DownloadStore) Query() *DownloadQuery
func (*DownloadStore) Save ¶
func (s *DownloadStore) Save(o *Download) error
func (*DownloadStore) Update ¶
func (s *DownloadStore) Update(o *Download) error
type FieldSchema ¶
type GolemSchema ¶
type GolemSchema struct { Download *DownloadSchema Medium *MediumSchema Release *ReleaseSchema }
type Medium ¶ added in v0.5.1
type Medium struct { Document `bson:",inline"` // include mgm.DefaultModel //ID primitive.ObjectID `json:"_id" bson:"_id,omitempty"` //CreatedAt time.Time `json:"created_at" bson:"created_at"` //UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` Type string `json:"type" bson:"_type"` Kind primitive.Symbol `json:"kind" bson:"kind"` Source string `json:"source" bson:"source"` SourceId string `json:"source_id" bson:"source_id"` Title string `json:"title" bson:"title"` Description string `json:"description" bson:"description"` Slug string `json:"slug" bson:"slug"` Text []string `json:"text" bson:"text"` Display string `json:"display" bson:"display"` Directory string `json:"directory" bson:"directory"` Search string `json:"search" bson:"search"` SearchParams struct { Type string `json:"type" bson:"type"` Verified bool `json:"verified" bson:"verified"` Group string `json:"group" bson:"group"` Author string `json:"author" bson:"author"` Resolution int `json:"resolution" bson:"resolution"` Source string `json:"source" bson:"source"` Uncensored bool `json:"uncensored" bson:"uncensored"` Bluray bool `json:"bluray" bson:"bluray"` } `json:"search_params" bson:"search_params"` Active bool `json:"active" bson:"active"` Downloaded bool `json:"downloaded" bson:"downloaded"` Completed bool `json:"completed" bson:"completed"` Skipped bool `json:"skipped" bson:"skipped"` Watched bool `json:"watched" bson:"watched"` Broken bool `json:"broken" bson:"broken"` ReleaseDate time.Time `json:"release_date" bson:"release_date"` Paths []struct { Id primitive.ObjectID `json:"ID" bson:"ID"` Type primitive.Symbol `json:"type" bson:"type"` Remote string `json:"remote" bson:"remote"` Local string `json:"local" bson:"local"` Extension string `json:"extension" bson:"extension"` Size int `json:"size" bson:"size"` UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` } `json:"paths" bson:"paths"` }
type MediumQuery ¶ added in v0.5.1
type MediumQuery struct {
// contains filtered or unexported fields
}
func (*MediumQuery) Asc ¶ added in v0.5.1
func (q *MediumQuery) Asc(field string) *MediumQuery
func (*MediumQuery) Desc ¶ added in v0.5.1
func (q *MediumQuery) Desc(field string) *MediumQuery
func (*MediumQuery) GreaterThan ¶ added in v0.5.1
func (q *MediumQuery) GreaterThan(key string, value interface{}) *MediumQuery
func (*MediumQuery) GreaterThanEqual ¶ added in v0.5.1
func (q *MediumQuery) GreaterThanEqual(key string, value interface{}) *MediumQuery
func (*MediumQuery) In ¶ added in v0.5.1
func (q *MediumQuery) In(key string, value interface{}) *MediumQuery
func (*MediumQuery) LessThan ¶ added in v0.5.1
func (q *MediumQuery) LessThan(key string, value interface{}) *MediumQuery
func (*MediumQuery) LessThanEqual ¶ added in v0.5.1
func (q *MediumQuery) LessThanEqual(key string, value interface{}) *MediumQuery
func (*MediumQuery) Limit ¶ added in v0.5.1
func (q *MediumQuery) Limit(limit int) *MediumQuery
func (*MediumQuery) NotEqual ¶ added in v0.5.1
func (q *MediumQuery) NotEqual(key string, value interface{}) *MediumQuery
func (*MediumQuery) NotIn ¶ added in v0.5.1
func (q *MediumQuery) NotIn(key string, value interface{}) *MediumQuery
func (*MediumQuery) Run ¶ added in v0.5.1
func (q *MediumQuery) Run() ([]Medium, error)
func (*MediumQuery) Skip ¶ added in v0.5.1
func (q *MediumQuery) Skip(skip int) *MediumQuery
func (*MediumQuery) Where ¶ added in v0.5.1
func (q *MediumQuery) Where(key string, value interface{}) *MediumQuery
type MediumSchema ¶ added in v0.5.1
type MediumSchema struct { Type *FieldSchema Kind *FieldSchema Source *FieldSchema SourceId *FieldSchema Title *FieldSchema Description *FieldSchema Slug *FieldSchema Text *FieldSchema Display *FieldSchema Directory *FieldSchema Search *FieldSchema SearchParams *FieldSchema Active *FieldSchema Downloaded *FieldSchema Completed *FieldSchema Skipped *FieldSchema Watched *FieldSchema Broken *FieldSchema ReleaseDate *FieldSchema Paths *FieldSchema }
type MediumStore ¶ added in v0.5.1
type MediumStore struct { Client *mongo.Client Database *mongo.Database Collection *mgm.Collection }
func NewMediumStore ¶ added in v0.5.1
func NewMediumStore(URI, db, name string) (*MediumStore, error)
func (*MediumStore) Delete ¶ added in v0.5.1
func (s *MediumStore) Delete(o *Medium) error
func (*MediumStore) FindByID ¶ added in v0.5.1
func (s *MediumStore) FindByID(id primitive.ObjectID) (*Medium, error)
func (*MediumStore) Query ¶ added in v0.5.1
func (s *MediumStore) Query() *MediumQuery
func (*MediumStore) Save ¶ added in v0.5.1
func (s *MediumStore) Save(o *Medium) error
func (*MediumStore) Update ¶ added in v0.5.1
func (s *MediumStore) Update(o *Medium) error
type Release ¶ added in v0.5.1
type Release struct { Document `bson:",inline"` // include mgm.DefaultModel //ID primitive.ObjectID `json:"_id" bson:"_id,omitempty"` //CreatedAt time.Time `json:"created_at" bson:"created_at"` //UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` Type string `json:"type" bson:"type"` Source string `json:"source" bson:"source"` Raw string `json:"raw" bson:"raw"` Title string `json:"title" bson:"title"` Description string `json:"description" bson:"description"` Size string `json:"size" bson:"size"` View string `json:"view" bson:"view"` Download string `json:"download" bson:"download"` Infohash string `json:"infohash" bson:"infohash"` Name string `json:"name" bson:"name"` Season int `json:"season" bson:"season"` Episode int `json:"episode" bson:"episode"` Volume int `json:"volume" bson:"volume"` Checksum string `json:"checksum" bson:"checksum"` Group string `json:"group" bson:"group"` Author string `json:"author" bson:"author"` Verified bool `json:"verified" bson:"verified"` Widescreen bool `json:"widescreen" bson:"widescreen"` Uncensored bool `json:"uncensored" bson:"uncensored"` Bluray bool `json:"bluray" bson:"bluray"` Resolution string `json:"resolution" bson:"resolution"` Encoding string `json:"encoding" bson:"encoding"` Quality string `json:"quality" bson:"quality"` Published time.Time `json:"published" bson:"published_at"` }
func NewRelease ¶ added in v0.5.1
func NewRelease() *Release
type ReleaseQuery ¶ added in v0.5.1
type ReleaseQuery struct {
// contains filtered or unexported fields
}
func (*ReleaseQuery) Asc ¶ added in v0.5.1
func (q *ReleaseQuery) Asc(field string) *ReleaseQuery
func (*ReleaseQuery) Desc ¶ added in v0.5.1
func (q *ReleaseQuery) Desc(field string) *ReleaseQuery
func (*ReleaseQuery) GreaterThan ¶ added in v0.5.1
func (q *ReleaseQuery) GreaterThan(key string, value interface{}) *ReleaseQuery
func (*ReleaseQuery) GreaterThanEqual ¶ added in v0.5.1
func (q *ReleaseQuery) GreaterThanEqual(key string, value interface{}) *ReleaseQuery
func (*ReleaseQuery) In ¶ added in v0.5.1
func (q *ReleaseQuery) In(key string, value interface{}) *ReleaseQuery
func (*ReleaseQuery) LessThan ¶ added in v0.5.1
func (q *ReleaseQuery) LessThan(key string, value interface{}) *ReleaseQuery
func (*ReleaseQuery) LessThanEqual ¶ added in v0.5.1
func (q *ReleaseQuery) LessThanEqual(key string, value interface{}) *ReleaseQuery
func (*ReleaseQuery) Limit ¶ added in v0.5.1
func (q *ReleaseQuery) Limit(limit int) *ReleaseQuery
func (*ReleaseQuery) NotEqual ¶ added in v0.5.1
func (q *ReleaseQuery) NotEqual(key string, value interface{}) *ReleaseQuery
func (*ReleaseQuery) NotIn ¶ added in v0.5.1
func (q *ReleaseQuery) NotIn(key string, value interface{}) *ReleaseQuery
func (*ReleaseQuery) Run ¶ added in v0.5.1
func (q *ReleaseQuery) Run() ([]Release, error)
func (*ReleaseQuery) Skip ¶ added in v0.5.1
func (q *ReleaseQuery) Skip(skip int) *ReleaseQuery
func (*ReleaseQuery) Where ¶ added in v0.5.1
func (q *ReleaseQuery) Where(key string, value interface{}) *ReleaseQuery
type ReleaseSchema ¶ added in v0.5.1
type ReleaseSchema struct { Type *FieldSchema Source *FieldSchema Raw *FieldSchema Title *FieldSchema Description *FieldSchema Size *FieldSchema View *FieldSchema Download *FieldSchema Infohash *FieldSchema Name *FieldSchema Season *FieldSchema Episode *FieldSchema Volume *FieldSchema Checksum *FieldSchema Group *FieldSchema Author *FieldSchema Verified *FieldSchema Widescreen *FieldSchema Uncensored *FieldSchema Bluray *FieldSchema Resolution *FieldSchema Encoding *FieldSchema Quality *FieldSchema Published *FieldSchema }
type ReleaseStore ¶ added in v0.5.1
type ReleaseStore struct { Client *mongo.Client Database *mongo.Database Collection *mgm.Collection }
func NewReleaseStore ¶ added in v0.5.1
func NewReleaseStore(URI, db, name string) (*ReleaseStore, error)
func (*ReleaseStore) Delete ¶ added in v0.5.1
func (s *ReleaseStore) Delete(o *Release) error
func (*ReleaseStore) Find ¶ added in v0.5.1
func (s *ReleaseStore) Find(id string) (*Release, error)
func (*ReleaseStore) FindByID ¶ added in v0.5.1
func (s *ReleaseStore) FindByID(id primitive.ObjectID) (*Release, error)
func (*ReleaseStore) Query ¶ added in v0.5.1
func (s *ReleaseStore) Query() *ReleaseQuery
func (*ReleaseStore) Save ¶ added in v0.5.1
func (s *ReleaseStore) Save(o *Release) error
func (*ReleaseStore) Update ¶ added in v0.5.1
func (s *ReleaseStore) Update(o *Release) error
Click to show internal directories.
Click to hide internal directories.