helpdesk_faq

package
v0.0.0-...-eb83c41 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapClient

type ConfigMapClient struct {
	// contains filtered or unexported fields
}

func NewCMClient

func NewCMClient(kubeClient ctrlruntimeclient.Client, namespace string, logger *logrus.Entry) ConfigMapClient

func (*ConfigMapClient) GetFAQItemIfExists

func (c *ConfigMapClient) GetFAQItemIfExists(timestamp string) (*FaqItem, error)

func (*ConfigMapClient) GetSerializedFAQItems

func (c *ConfigMapClient) GetSerializedFAQItems() ([]string, error)

func (*ConfigMapClient) RemoveItem

func (c *ConfigMapClient) RemoveItem(timestamp string) error

func (*ConfigMapClient) UpsertItem

func (c *ConfigMapClient) UpsertItem(item FaqItem) error

type FaqItem

type FaqItem struct {
	Question         Question `json:"question"`
	Timestamp        string   `json:"timestamp"`
	ThreadLink       string   `json:"thread_link"`
	ContributingInfo []Reply  `json:"contributing_info"`
	Answers          []Reply  `json:"answers"`
}

func (FaqItem) ReplyExists

func (f FaqItem) ReplyExists(timestamp string) bool

ReplyExists takes a timestamp and returns true if the reply at that timestamp is included in the Answers or ContributingInfo on this FaqItem

type FaqItemClient

type FaqItemClient interface {
	GetSerializedFAQItems() ([]string, error)
	GetFAQItemIfExists(timestamp string) (*FaqItem, error)
	UpsertItem(item FaqItem) error
	RemoveItem(timestamp string) error
}

type Question

type Question struct {
	Author  string `json:"author"`
	Topic   string `json:"topic"`
	Subject string `json:"subject"`
	Body    string `json:"body"`
}

type Reply

type Reply struct {
	Author    string `json:"author"`
	Timestamp string `json:"timestamp"`
	Body      string `json:"body"`
}

Jump to

Keyboard shortcuts

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