sourcetype

package
v2.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GUnzip

func GUnzip(data string) (string, error)

Types

type Media

type Media struct {
	Name        string `json:"name"`
	Mimetype    string `json:"mimetype"`
	Type        string `json:"type"`
	Uri         string `json:"uri"`
	Width       int64  `json:"width,omitempty"`
	Height      int64  `json:"height,omitempty"`
	Orientation int64  `json:"orientation,omitempty"`
	Duration    int64  `json:"duration,omitempty"`
	Fulltext    string `json:"fulltext,omitempty"`
}

type MediaList

type MediaList []Media

func (MediaList) Len

func (ml MediaList) Len() int

func (MediaList) Less

func (ml MediaList) Less(i, j int) bool

func (MediaList) Swap

func (ml MediaList) Swap(i, j int)

type Metalist

type Metalist map[string]string

func (Metalist) MarshalJSON

func (ml Metalist) MarshalJSON() ([]byte, error)

func (*Metalist) UnmarshalJSON

func (ml *Metalist) UnmarshalJSON(b []byte) error

type Note

type Note struct {
	Title string        `json:"title"`
	Note  template.HTML `json:"note"`
}

type Person

type Person struct {
	Name string `json:"name"`
	Role string `json:"role"`
}

type Query

type Query struct {
	Label  string `json:"label"`
	Search string `json:"search"`
}

type Reference

type Reference struct {
	Type      string `json:"type"`
	Title     string `json:"title"`
	Signature string `json:"signature"`
}

type SourceData

type SourceData struct {
	ID                string                     `json:"-"`
	Signature         string                     `json:"signature"`
	SignatureOriginal string                     `json:"signatureoriginal"`
	Source            string                     `json:"source"`
	Title             *translate.MultiLangString `json:"title"`
	Series            string                     `json:"series"`
	Place             string                     `json:"place"`
	Date              string                     `json:"date"`
	CollectionTitle   string                     `json:"collectiontitle"`
	Persons           []Person                   `json:"persons"`
	ACL               map[string][]string        `json:"acl"`
	Catalog           []string                   `json:"catalog"`
	Category          []string                   `json:"category"`
	Tags              []string                   `json:"tags"`
	Media             map[string]MediaList       `json:"media"`
	Poster            *Media                     `json:"poster"`
	Notes             []Note                     `json:"notes"`
	Url               string                     `json:"url"`
	Abstract          *translate.MultiLangString `json:"abstract"`
	References        []Reference                `json:"references"`
	Meta              *Metalist                  `json:"meta,omitempty"`
	Extra             *Metalist                  `json:"extra,omitempty"`
	Vars              *Varlist                   `json:"vars,omitempty"`
	Type              string                     `json:"type"`
	Queries           []Query                    `json:"queries,omitempty"`
	ContentStr        string                     `json:"-"`
	ContentMime       string                     `json:"-"`
	HasMedia          bool                       `json:"hasmedia"`
	Mediatype         []string                   `json:"mediatype"`
	DateAdded         time.Time                  `json:"dateadded"`
	Timestamp         time.Time                  `json:"timestamp"`
	Publisher         string                     `json:"publisher"`
	Rights            string                     `json:"rights"`
	License           string                     `json:"license"`
}

type Varlist

type Varlist map[string][]string

func (Varlist) Append

func (vl Varlist) Append(key string, values []string)

func (Varlist) AppendMap

func (vl Varlist) AppendMap(mv map[string][]string)

func (Varlist) MarshalJSON

func (vl Varlist) MarshalJSON() ([]byte, error)

func (Varlist) Unique

func (vl Varlist) Unique() *Varlist

func (*Varlist) UnmarshalJSON

func (vl *Varlist) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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