feed

package
v0.0.0-...-c937b9e Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2015 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feed

type Feed struct {
	pagination.Meta `json:",inline"`
	Results         []*FeedItem `json:"results"`
}

type FeedItem

type FeedItem struct {
	Id      bson.ObjectId `json:"id" bson:"_id"`
	Type    ItemType      `json:"type"`
	Created time.Time     `json:"created,omitempty" description:"when feed item is created"`
	Updated time.Time     `json:"updated,omitempty" description:"when feed item is updated"`

	Owner   bson.ObjectId `json:"owner" bson:"owner" description:""`
	Target  bson.ObjectId `json:"target" bson:"target" description:"target for this feed item"`
	Project bson.ObjectId `json:"project" bson:"project" description:"project for this feed item"`

	// data for scan types
	ScanId        bson.ObjectId         `json:"-" bson:"scanid,omitempty"`
	Scan          *scan.Scan            `json:"scan,omitempty" description:"scan shows only for type: scan"`
	SummaryReport *target.SummaryReport `json:"summaryReport,omitempty" bson:"summaryReport" description:"shows only for type: scan"`
	Techs         []*tech.Tech          `json:"techs,omitempty" bson:"techs" description:"shows only for type: scan"`
}

func (*FeedItem) String

func (p *FeedItem) String() string

type ItemType

type ItemType string
const (
	TypeComment ItemType = "comment"
	TypeScan    ItemType = "scan"
)

func (ItemType) Convert

func (t ItemType) Convert(text string) (interface{}, error)

func (ItemType) Enum

func (t ItemType) Enum() []interface{}

func (ItemType) MarshalJSON

func (t ItemType) MarshalJSON() ([]byte, error)

It's a hack to show custom type as string in swagger

Jump to

Keyboard shortcuts

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