encoders

package
v0.0.0-...-ba6b397 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Badge

type Badge struct {
	ID       string `xml:"Id,attr"`
	UserID   string `xml:"UserId,attr"`
	Class    string `xml:"Class,attr"`
	Name     string `xml:"Name,attr"`
	TagBased string `xml:"TagBased,attr"`
	Date     string `xml:"Date,attr"`
}

Badge entity

func (*Badge) GETCSVRow

func (b *Badge) GETCSVRow(skipHTMLDecoding bool) []string

GETCSVRow returns row values for the corresponding encoder type

func (Badge) GetCSVHeaderRow

func (b Badge) GetCSVHeaderRow() []string

GetCSVHeaderRow returns CSV header for the correspondig encoder type

type CSVEncoder

type CSVEncoder interface {
	// GetCSVHeaderRow returns CSV header for the correspondig encoder type.
	// WARNING! Order is crucial!
	// Fields will be written to the CSV file in the same order this function returns them.
	GetCSVHeaderRow() []string

	// GETCSVRow returns row values for the corresponding encoder type
	// WARNING! Order is crucial!
	// Values will be written to the CSV file in the same order this function returns them.
	GETCSVRow(skipHTMLDecoding bool) []string
}

CSVEncoder interface

func NewEncoder

func NewEncoder(typeName string) (c CSVEncoder, err error)

NewEncoder returns a pointer to the new encoder according to requested type

type Comment

type Comment struct {
	ID              string `xml:"Id,attr"`
	PostID          string `xml:"PostId,attr"`
	UserID          string `xml:"UserId,attr"`
	Score           string `xml:"Score,attr"`
	ContentLicense  string `xml:"ContentLicense,attr"`
	UserDisplayName string `xml:"UserDisplayName,attr"`
	Text            string `xml:"Text,attr"`
	CreationDate    string `xml:"CreationDate,attr"`
}

Comment entity

func (*Comment) GETCSVRow

func (c *Comment) GETCSVRow(skipHTMLDecoding bool) []string

GETCSVRow returns row values for the corresponding encoder type

func (Comment) GetCSVHeaderRow

func (c Comment) GetCSVHeaderRow() []string

GetCSVHeaderRow returns CSV header for the correspondig encoder type

type Post

type Post struct {
	ID                    string `xml:"Id,attr"`
	OwnerUserID           string `xml:"OwnerUserId,attr"`
	LastEditorUserID      string `xml:"LastEditorUserId,attr"`
	PostTypeID            string `xml:"PostTypeId,attr"`
	AcceptedAnswerID      string `xml:"AcceptedAnswerId,attr"`
	Score                 string `xml:"Score,attr"`
	ParentID              string `xml:"ParentId,attr"`
	ViewCount             string `xml:"ViewCount,attr"`
	AnswerCount           string `xml:"AnswerCount,attr"`
	CommentCount          string `xml:"CommentCount,attr"`
	OwnerDisplayName      string `xml:"OwnerDisplayName,attr"`
	LastEditorDisplayName string `xml:"LastEditorDisplayName,attr"`
	Title                 string `xml:"Title,attr"`
	Tags                  string `xml:"Tags,attr"`
	ContentLIcense        string `xml:"ContentLicense,attr"`
	Body                  string `xml:"Body,attr"`
	FavoriteCount         string `xml:"FavoriteCount,attr"`
	CreationDate          string `xml:"CreationDate,attr"`
	CommunityOwnedDate    string `xml:"CommunityOwnedDate,attr"`
	ClosedDate            string `xml:"ClosedDate,attr"`
	LastEditDate          string `xml:"LastEditDate,attr"`
	LastActivityDate      string `xml:"LastActivityDate,attr"`
}

Post entity

func (*Post) GETCSVRow

func (p *Post) GETCSVRow(skipHTMLDecoding bool) []string

GETCSVRow returns row values for the corresponding encoder type

func (Post) GetCSVHeaderRow

func (p Post) GetCSVHeaderRow() []string

GetCSVHeaderRow returns CSV header for the correspondig encoder type

type PostHistory

type PostHistory struct {
	ID                string `xml:"Id,attr"`
	PostID            string `xml:"PostId,attr"`
	UserID            string `xml:"UserId,attr"`
	PostHistoryTypeID string `xml:"PostHistoryTypeId,attr"`
	UserDisplayName   string `xml:"UserDisplayName,attr"`
	ContentLicense    string `xml:"ContentLicense,attr"`
	RevisionGUID      string `xml:"RevisionGUID,attr"`
	Text              string `xml:"Text,attr"`
	Comment           string `xml:"Comment,attr"`
	CreationDate      string `xml:"CreationDate,attr"`
}

PostHistory entity

func (*PostHistory) GETCSVRow

func (ph *PostHistory) GETCSVRow(skipHTMLDecoding bool) []string

GETCSVRow returns row values for the corresponding encoder type

func (PostHistory) GetCSVHeaderRow

func (ph PostHistory) GetCSVHeaderRow() []string

GetCSVHeaderRow returns CSV header for the correspondig encoder type

type PostLink struct {
	ID            string `xml:"Id,attr"`
	RelatedPostID string `xml:"RelatedPostId,attr"`
	PostID        string `xml:"PostId,attr"`
	LinkTypeID    string `xml:"LinkTypeId,attr"`
	CreationDate  string `xml:"CreationDate,attr"`
}

PostLink entity

func (PostLink) GETCSVRow

func (pl PostLink) GETCSVRow(skipHTMLDecoding bool) []string

GETCSVRow returns row values for the corresponding encoder type

func (PostLink) GetCSVHeaderRow

func (pl PostLink) GetCSVHeaderRow() []string

GetCSVHeaderRow returns CSV header for the correspondig encoder type

type Tag

type Tag struct {
	ID            string `xml:"Id,attr"`
	ExcerptPostID string `xml:"ExcerptPostId,attr"`
	WikiPostID    string `xml:"WikiPostId,attr"`
	TagName       string `xml:"TagName,attr"`
	Count         string `xml:"Count,attr"`
}

Tag entity

func (*Tag) GETCSVRow

func (t *Tag) GETCSVRow(skipHTMLDecoding bool) []string

GETCSVRow returns row values for the corresponding encoder type

func (Tag) GetCSVHeaderRow

func (t Tag) GetCSVHeaderRow() []string

GetCSVHeaderRow returns CSV header for the correspondig encoder type

type User

type User struct {
	ID              string `xml:"Id,attr"`
	AccountID       string `xml:"AccountId,attr"`
	Reputation      string `xml:"Reputation,attr"`
	Views           string `xml:"Views,attr"`
	DownVotes       string `xml:"DownVotes,attr"`
	UpVotes         string `xml:"UpVotes,attr"`
	DisplayName     string `xml:"DisplayName,attr"`
	Location        string `xml:"Location,attr"`
	ProfileImageURL string `xml:"ProfileImageUrl,attr"`
	WebsiteURL      string `xml:"WebsiteUrl,attr"`
	AboutMe         string `xml:"AboutMe,attr"`
	CreationDate    string `xml:"CreationDate,attr"`
	LastAccessDate  string `xml:"LastAccessDate,attr"`
}

User entity

func (*User) GETCSVRow

func (u *User) GETCSVRow(skipHTMLDecoding bool) []string

GETCSVRow returns row values for the corresponding encoder type

func (User) GetCSVHeaderRow

func (u User) GetCSVHeaderRow() []string

GetCSVHeaderRow returns CSV header for the correspondig encoder type

type Vote

type Vote struct {
	ID           string `xml:"Id,attr"`
	UserID       string `xml:"UserId,attr"`
	PostID       string `xml:"PostId,attr"`
	VoteTypeID   string `xml:"VoteTypeId,attr"`
	BountyAmount string `xml:"BountyAmount,attr"`
	CreationDate string `xml:"CreationDate,attr"`
}

Vote entity

func (*Vote) GETCSVRow

func (v *Vote) GETCSVRow(skipHTMLDecoding bool) []string

GETCSVRow returns row values for the corresponding encoder type

func (Vote) GetCSVHeaderRow

func (v Vote) GetCSVHeaderRow() []string

GetCSVHeaderRow returns CSV header for the correspondig encoder type

Jump to

Keyboard shortcuts

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