Documentation ¶
Index ¶
- Variables
- func AllowedToRespond(parentCommentID, commenterClaimID string) error
- func CloseBody(responseBody io.ReadCloser)
- func CloseWriter(w io.WriteCloser)
- func CreateDigest(pieces ...[]byte) []byte
- func FindOrCreateChannel(channelClaimID, channelName string) (*model.Channel, error)
- func FindOrCreateSettings(creatorChannel *model.Channel) (*model.CreatorSetting, error)
- func FormatDur(duration time.Duration) string
- func GetIPAddressForRequest(r *http.Request) string
- func GetModerator(modChannelID, modChannelName, creatorChannelID, creatorChannelName string) (*model.Channel, *model.Channel, error)
- func ReverseString(s string) string
- func StringSplitArg(stringToSplit, separator string) []interface{}
Constants ¶
This section is empty.
Variables ¶
var Debugging bool
Debugging used for recording if the app is debugging mode.
Functions ¶
func AllowedToRespond ¶
AllowedToRespond checks if the creator of the comment will allow a response from the respondent
func CloseBody ¶
func CloseBody(responseBody io.ReadCloser)
CloseBody used to catch and log errors from closing a response body
func CloseWriter ¶
func CloseWriter(w io.WriteCloser)
CloseWriter used to catch and log errors from closing a writer
func CreateDigest ¶
CreateDigest utility function for grouping multiple sets of bytes. Largely used for signature verification
func FindOrCreateChannel ¶
FindOrCreateChannel gets the channel from commentron database or creates it and returns it
func FindOrCreateSettings ¶
func FindOrCreateSettings(creatorChannel *model.Channel) (*model.CreatorSetting, error)
FindOrCreateSettings gets the settings for the creator from commentron database or creates it and returns it
func GetIPAddressForRequest ¶
GetIPAddressForRequest returns the real IP address of the request
func GetModerator ¶
func GetModerator(modChannelID, modChannelName, creatorChannelID, creatorChannelName string) (*model.Channel, *model.Channel, error)
GetModerator returns the validated moderator and the creator which delegated the moderator. If a creator is not passed the moderator will be returned as the creator and will be equal.
func StringSplitArg ¶
func StringSplitArg(stringToSplit, separator string) []interface{}
StringSplitArg splits CSV string into interface values that can be passed to SQLBoiler
Types ¶
This section is empty.