Documentation ¶
Index ¶
Constants ¶
const StoreDir string = "./data"
StoreDir specifies the directory to save data in
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateStores ¶
type AggregateStores struct { // Jira is the store used to save Jira aggregates Jira *JiraAggregateStore // GitHub is the store used to save GitHub aggregates GitHub *GitHubAggregateStore // Links is the sotre used to save Link aggregates Links *LinkAggregateStore }
AggregateStores is a collection of all the stores used to save aggregates.
func NewAggregateStores ¶
func NewAggregateStores() (*AggregateStores, error)
NewAggregateStores creates a new AggregateStores instance. An error is returned if one occurs.
type GitHubAggregateStore ¶
type GitHubAggregateStore struct {
*ScribbleStore
}
GitHubAggregateStore is a store which implements an addition Get method for the GitHubAggregate.
func NewGitHubAggregateStore ¶
func NewGitHubAggregateStore() (*GitHubAggregateStore, error)
NewGitHubAggregateStore creates a new GitHubAggregate store. An error is returned if one occurs.
func (GitHubAggregateStore) Get ¶
func (s GitHubAggregateStore) Get(id string, data *models.GitHubAggregate) error
Get retrieves a GitHubAggregate
type GitHubStores ¶
type GitHubStores struct { // Users is the GitHub User store Users *GitHubUserStore }
GitHubStores is a collection of all the stores used to save GitHub model data.
func NewGitHubStores ¶
func NewGitHubStores() (*GitHubStores, error)
NewGitHubStores creates a new GitHubStores instance. An error is returned if one occurs.
type GitHubUserStore ¶
type GitHubUserStore struct {
*ScribbleStore
}
GitHubUserStore is a store which implements an addition Get method for GitHubUser models.
func NewGitHubUserStore ¶
func NewGitHubUserStore() (*GitHubUserStore, error)
NewGitHubUserStore creates a new GitHubUser store. An error is returned if one occurs.
func (GitHubUserStore) Get ¶
func (s GitHubUserStore) Get(id string, data *models.GitHubUser) error
Get retrieves a GitHubUser
type JiraAggregateStore ¶
type JiraAggregateStore struct {
*ScribbleStore
}
JiraAggregateStore is a store which implements an addition Get method for the JiraAggregate.
func NewJiraAggregateStore ¶
func NewJiraAggregateStore() (*JiraAggregateStore, error)
NewJiraAggregateStore creates a new JiraAggregate store. An error is returned if one occurs.
func (JiraAggregateStore) Get ¶
func (s JiraAggregateStore) Get(id string, data *models.JiraAggregate) error
Get retrieves a JiraAggregate
type JiraIssueStore ¶
type JiraIssueStore struct {
*ScribbleStore
}
JiraIssueStore is a store which implements an addition Get method for JiraIssue models.
func NewJiraIssueStore ¶
func NewJiraIssueStore() (*JiraIssueStore, error)
NewJiraIssueStore creates a new JiraIssue store. An error is returned if one occurs.
type JiraStores ¶
type JiraStores struct { // Issues is the Jira Issue store Issues *JiraIssueStore // Users is the Jira User store Users *JiraUserStore }
JiraStores is a collection of all the stores used to save Jira model data.
func NewJiraStores ¶
func NewJiraStores() (*JiraStores, error)
NewJiraStores creates a new JiraStores instance. An error is returned if one occurs.
type JiraUserStore ¶
type JiraUserStore struct {
*ScribbleStore
}
JiraUserStore is a store which implements an addition Get method for JiraUser models.
func NewJiraUserStore ¶
func NewJiraUserStore() (*JiraUserStore, error)
NewJiraUserStore creates a new JiraUser store. An error is returned if one occurs.
type LinkAggregateStore ¶
type LinkAggregateStore struct {
*ScribbleStore
}
LinkAggregateStore is a store which implements an addition Get method for LinkAggregate models.
func NewLinkAggregateStore ¶
func NewLinkAggregateStore() (*LinkAggregateStore, error)
NewLinkAggregateStore creates a new LinkAggregate store. An error is returned if one occurs.
func (LinkAggregateStore) Get ¶
func (s LinkAggregateStore) Get(id string, data *models.LinkAggregate) error
Get retrieves a LinkAggregate
type LinkStore ¶
type LinkStore struct {
*ScribbleStore
}
LinkStore is a store which implements an addition Get method for Link models.
func NewLinkStore ¶
NewLinkStore creates a new Link store. The name of the model links are being stored for should be provided. An error is returned if one occurs.
type LinkStores ¶
type LinkStores struct { // Users is the store used to save User model links Users *LinkStore // Labels is the store used to save Label model links Labels *LinkStore // Issues is the store used to save Issue model links Issues *LinkStore }
LinkStores is a collection of all the stores used to save Link models.
func NewLinkStores ¶
func NewLinkStores() (*LinkStores, error)
NewLinkStores create a new LinkStores instance. An error is returned if one occurs.
type ScribbleStore ¶
type ScribbleStore struct {
// contains filtered or unexported fields
}
ScribbleStore implements the Store interface using the Scribble library
func NewScribbleStore ¶
func NewScribbleStore(name string) (*ScribbleStore, error)
NewScribbleStore creates a new ScribbleStore for the specified store name. Returns an error if one occurs, nil on success.
func (ScribbleStore) HasKey ¶
func (s ScribbleStore) HasKey(id string) (bool, error)
HasKey implements Store.HasKey
func (ScribbleStore) Hash ¶
func (s ScribbleStore) Hash(id string) (string, error)
Hash implements Store.Hash
func (ScribbleStore) Keys ¶
func (s ScribbleStore) Keys() ([]string, error)
Keys implements Store.Keys
type Store ¶
type Store interface { // Set saves a value in a store under a specified id. An error is // returned if one occurs, nil on success. Set(id string, data json.Marshaler) error // Hash retrieves the hash of the key's contents Hash(id string) (string, error) // Keys returns all the keys present in a store Keys() ([]string, error) // HasKey indicates if the store contains an entry for the provided // key. An error is returned if one occurs. HasKey(id string) (bool, error) }
Store provides an interface for managing data store information
type Stores ¶
type Stores struct { // Jira holds Jira model stores Jira *JiraStores // GitHub holds GitHub model stores GitHub *GitHubStores // Links holds Link model stores Links *LinkStores // Aggregates holds Aggregate stores Aggregates *AggregateStores }
Stores is a collection of all the different stores used to save model data.