socialmedia

package
Version: v0.0.0-...-d41341d Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2018 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package SocialMedia implements common functionality needed for social media web applications.

Index

Constants

This section is empty.

Variables

View Source
var Moods map[string]MoodState

Map that holds the various mood states with keys to serve as aliases to their respective mood states.

Functions

This section is empty.

Types

type AuditableContent

type AuditableContent struct {
	TimeCreated  time.Time
	TimeModified time.Time
	CreatedBy    string
	ModifiedBy   string
}

AuditableContent types are meant to be embedded into types we want to keep a check on for auditing purposes

type MoodState

type MoodState int
const (
	MoodStateNeutral MoodState = iota
	MoodStateHappy
	MoodStateSad
	MoodStateAngry
	MoodStateHopeful
	MoodStateThrilled
	MoodStateBored
	MoodStateShy
	MoodStateComical
	MoodStateOnCloudNine
)

All possible mood states.

func (MoodState) String

func (i MoodState) String() string

type Post

type Post struct {
	AuditableContent // Embedded type
	Caption          string
	MessageBody      string
	URL              string
	ImageURI         string
	ThumbnailURI     string
	Keywords         []string
	Likers           []string
	AuthorMood       MoodState
}

Post represents a Social Media Post type.

func NewPost

func NewPost(username string, mood MoodState, caption string, messageBody string, url string, imageURI string, thumbnailURI string, keywords []string) *Post

NewPost is responsible for creating an instance of the Post type.

Jump to

Keyboard shortcuts

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