models

package
v0.0.0-...-168746e Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpError

func NewHttpError(statusCode int, message interface{}) error

Types

type Entry

type Entry struct {
	Id          string
	Title       string
	Published   time.Time
	Updated     time.Time
	Author      string
	Link        string
	Description string
	Content     string
}

func (*Entry) PublishedString

func (e *Entry) PublishedString(format string) string

func (*Entry) UpdatedString

func (e *Entry) UpdatedString(format string) string

type Feed

type Feed struct {
	Title       string
	Description string
	Language    string
	Published   time.Time
	Updated     time.Time
	SelfLink    string
	Link        string
	Author      string
	Entries     []*Entry
}

func (*Feed) PublishedString

func (f *Feed) PublishedString(format string) string

func (*Feed) UpdatedString

func (f *Feed) UpdatedString(format string) string

type Format

type Format int
const (
	FormatUndefined Format = iota
	FormatAtom
	FormatRss
)

func ParseFormat

func ParseFormat(value string) Format

func (Format) String

func (f Format) String() string

type HTTPError

type HTTPError struct {
	StatusCode int
	Message    interface{}
}

func (*HTTPError) Error

func (h *HTTPError) Error() string

Makes HTTPError compatible with the error interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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