model

package
v0.0.0-...-8c30c0b Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	Bid   int32
	Title string
}

type BookPage

type BookPage struct {
	Mlid int32
	Nid  int32
	Bid  int32
}

type CCKField

type CCKField struct {
	Name, SubName, Type string
}

type CCKFieldType

type CCKFieldType struct {
	Name           string                      `db:"field_name"`
	Type           string                      `db:"type"`
	ContentType    string                      `db:"type_name"`
	Gs             string                      `db:"global_settings"`
	GlobalSettings map[interface{}]interface{} `db:"-"`
	Required       bool                        `db:"required"`
	Multiple       bool                        `db:"multiple"`
	DBStorage      bool                        `db:"db_storage"`
	Module         string                      `db:"module"`
	Dbc            string                      `db:"db_columns"`
	DBColumns      map[interface{}]interface{} `db:"-"`
	Locked         bool                        `db:"locked"`
}

type Database

type Database struct {
	Db     *sql.DB
	DbMap  *gorp.DbMap
	Prefix string
}

func Connect

func Connect(driver, connection, prefix string, verbose bool) Database

func (Database) AllBookPages

func (db Database) AllBookPages() []*BookPage

func (Database) AllBookPagesAsMap

func (db Database) AllBookPagesAsMap() map[int32]*BookPage

func (Database) AllBooks

func (db Database) AllBooks() []*Book

func (Database) AllBooksAsMap

func (db Database) AllBooksAsMap() map[int32]string

func (Database) AllMenus

func (db Database) AllMenus() []*MenuCustom

func (Database) AllNodeTypes

func (db Database) AllNodeTypes() []*NodeType

func (Database) AllVocabularies

func (db Database) AllVocabularies() []*Vocabulary

func (Database) CCKDataForNode

func (db Database) CCKDataForNode(node *JoinedNodeDataBody, fields []*CCKFieldType) (map[CCKField]interface{}, error)

func (Database) CCKFields

func (db Database) CCKFields() (map[string][]*CCKFieldType, error)

func (Database) GetUrlAlias

func (db Database) GetUrlAlias(nid int32) string

func (Database) JoinedMenusForPath

func (db Database) JoinedMenusForPath(path string) []*JoinedMenu

func (Database) JoinedNodeFields

func (db Database) JoinedNodeFields(offset, count int) []*JoinedNodeDataBody

func (Database) JoinedTaxonomyTerms

func (db Database) JoinedTaxonomyTerms(nid int32) []*JoinedTaxonomyTerm

func (Database) MenusForMlid

func (db Database) MenusForMlid(mlid int32) []*JoinedMenu

type Emvideo

type Emvideo struct {
	VideoId, Provider string
}

func EmvideoForNodeField

func EmvideoForNodeField(cckFieldType *CCKFieldType, cckFieldData map[CCKField]interface{}) (*Emvideo, error)

type EmvideoError

type EmvideoError struct {
	// contains filtered or unexported fields
}

func (EmvideoError) Error

func (e EmvideoError) Error() string

type JoinedMenu

type JoinedMenu struct {
	MenuName    string
	Title       string
	Mlid        int32
	Plid        int32
	LinkPath    string
	LinkTitle   string
	Module      string
	External    bool
	HasChildren bool
	Expanded    bool
	Weight      int
	TreeDepth   int
	Customized  bool
}

type JoinedNodeDataBody

type JoinedNodeDataBody struct {
	Nid       int32
	Vid       int32
	Type      string
	Title     string
	Published bool // column=status
	Created   int64
	Changed   int64
	Comment   int8
	Promote   bool
	Sticky    bool
	//Bundle      string
	//Deleted     bool
	//RevisionId  int32
	//Delta       int32
	BodyValue   sql.NullString
	BodySummary sql.NullString
	BodyFormat  sql.NullString
}

func (JoinedNodeDataBody) Filename

func (node JoinedNodeDataBody) Filename() string

type JoinedTaxonomyTerm

type JoinedTaxonomyTerm struct {
	Nid   int32
	Name  string
	Vocab string
}
type Menu struct {
	MenuName    string
	Mlid        int32
	Plid        int32
	LinkPath    string
	LinkTitle   string
	Module      string
	External    bool
	HasChildren bool
	Expanded    bool
	Weight      int
	TreeDepth   int
	Customized  bool
}
type MenuCustom struct {
	MenuName    string `db:"menu_name"`
	Title       string
	Description string
}

type Node

type Node struct {
	Nid       int32
	Vid       int32
	Type      string
	Language  string
	Title     string
	Uid       int32
	Status    bool
	Created   int64
	Changed   int64
	Comment   int8
	Promote   bool
	Sticky    bool
	Tnid      int32
	Translate int32
}

func AllNodes

func AllNodes(dbMap *gorp.DbMap, prefix string) []*Node

type NodeType

type NodeType struct {
	Type   string
	Name   string
	Module string
}

type TaxonomyIndex

type TaxonomyIndex struct {
	Nid     int32
	Tid     int32
	Sticky  bool
	Created int64
}

type UrlAlias

type UrlAlias struct {
	Pid      int32
	Source   string
	Alias    string
	Language string
}

type Vocabulary

type Vocabulary struct {
	Vid  int32
	Name string
}

Jump to

Keyboard shortcuts

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