topics

package
v1.0.0-1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasTopic

func HasTopic(projectUUID string, name string, store stores.Store) bool

HasTopic returns true if project & topic combination exist

func RemoveTopic

func RemoveTopic(projectUUID string, name string, store stores.Store) error

RemoveTopic removes an existing topic

Types

type Topic

type Topic struct {
	ProjectUUID string `json:"-"`
	Name        string `json:"-"`
	FullName    string `json:"name"`
}

Topic struct to hold information for a given topic

func CreateTopic

func CreateTopic(projectUUID string, name string, store stores.Store) (Topic, error)

CreateTopic creates a new topic

func New

func New(projectUUID string, projectName string, name string) Topic

New creates a new topic based on name

func (*Topic) ExportJSON

func (tp *Topic) ExportJSON() (string, error)

ExportJSON exports whole Topic Structure as a json string

type Topics

type Topics struct {
	List []Topic `json:"topics,omitempty"`
}

Topics holds a list of Topic items

func Find

func Find(projectUUID string, name string, store stores.Store) (Topics, error)

Find searches and returns a specific topic or all topics of a given project

func (*Topics) Empty

func (tl *Topics) Empty() bool

Empty returns true if Topics has no items

func (*Topics) ExportJSON

func (tl *Topics) ExportJSON() (string, error)

ExportJSON exports whole Topics List Structure as a json string

Jump to

Keyboard shortcuts

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