Documentation ¶
Index ¶
- Constants
- func IsValidJournalPermission(permission string) bool
- func IsValidMemberType(memberType string) bool
- func ValidJournalPermissions() []string
- func ValidMemberTypes() []string
- type Entry
- type EntryContext
- type EntryResultsPage
- type Journal
- type JournalPermission
- type JournalPermissionsList
- type JournalsList
- type SpireCaller
- type SpireClient
- func (client SpireClient) AddJournalMember(token, journalID, memberID, memberType string, permissions []string) (JournalPermissionsList, error)
- func (client SpireClient) CreateEntry(token, journalID, title, content string, tags []string, context EntryContext) (Entry, error)
- func (client SpireClient) CreateJournal(token, name string) (Journal, error)
- func (client SpireClient) DeleteEntry(token, journalID, entryID string) (Entry, error)
- func (client SpireClient) DeleteJournal(token, journalID string) (Journal, error)
- func (client SpireClient) GetEntry(token, journalID, entryID string) (Entry, error)
- func (client SpireClient) GetJournal(token, journalID string) (Journal, error)
- func (client SpireClient) ListEntries(token, journalID string, limit, offset int) (EntryResultsPage, error)
- func (client SpireClient) ListJournals(token string) (JournalsList, error)
- func (client SpireClient) Ping() (string, error)
- func (client SpireClient) RemoveJournalMember(token, journalID, memberID, memberType string, permissions []string) (JournalPermissionsList, error)
- func (client SpireClient) SearchEntries(token, journalID, searchQuery string, limit, offset int, ...) (EntryResultsPage, error)
- func (client SpireClient) TagEntry(token, journalID, entryID string, tags []string) (Entry, error)
- func (client SpireClient) UntagEntry(token, journalID, entryID string, tags []string) (Entry, error)
- func (client SpireClient) UpdateEntry(token, journalID, entryID, title, content string) (Entry, error)
- func (client SpireClient) UpdateJournal(token, journalID, name string) (Journal, error)
- type SpireRoutes
Constants ¶
View Source
const BugoutSpireURL string = "https://spire.bugout.dev"
Default Spire URL
Variables ¶
This section is empty.
Functions ¶
func IsValidMemberType ¶
func ValidJournalPermissions ¶
func ValidJournalPermissions() []string
func ValidMemberTypes ¶
func ValidMemberTypes() []string
Types ¶
type Entry ¶
type Entry struct { Id string `json:"id,omitempty"` Url string `json:"entry_url,omitempty"` JournalURL string `json:"journal_url,omitempty"` Title string `json:"title"` Content string `json:"content"` Tags []string `json:"tags"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` ContextUrl string `json:"context_url,omitempty"` ContextType string `json:"context_type,omitempty"` Score float64 `json:"score,omitempty"` }
type EntryContext ¶
type EntryResultsPage ¶
type JournalPermission ¶
type JournalPermissionsList ¶
type JournalPermissionsList struct {
Scopes []JournalPermission `json:"scopes"`
}
type JournalsList ¶
type JournalsList struct {
Journals []Journal `json:"journals"`
}
type SpireCaller ¶
type SpireCaller interface { Ping() (string, error) CreateJournal(token, name string) (Journal, error) GetJournal(token, journalID string) (Journal, error) ListJournals(token string) (JournalsList, error) UpdateJournal(token, journalID, name string) (Journal, error) DeleteJournal(token, journalID string) (Journal, error) AddJournalMember(token, journalID, memberID, memberType string, permissions []string) (JournalPermissionsList, error) RemoveJournalMember(token, journalID, memberID, memberType string, permissions []string) (JournalPermissionsList, error) CreateEntry(token, journalID, title, content string, tags []string, context EntryContext) (Entry, error) DeleteEntry(token, journalID, entryID string) (Entry, error) GetEntry(token, journalID, entryID string) (Entry, error) ListEntries(token, journalID string, limit, offset int) (EntryResultsPage, error) SearchEntries(token, journalID, searchQuery string, limit, offset int, queryParameters map[string]string) (EntryResultsPage, error) TagEntry(token, journalID, entryID string, tags []string) (Entry, error) UntagEntry(token, journalID, entryID string, tags []string) (Entry, error) UpdateEntry(token, journalID, entryID, title, content string) (Entry, error) }
type SpireClient ¶
type SpireClient struct { SpireURL string Routes SpireRoutes HTTPClient *http.Client }
func ClientFromEnv ¶
func ClientFromEnv() (SpireClient, error)
func (SpireClient) AddJournalMember ¶
func (client SpireClient) AddJournalMember(token, journalID, memberID, memberType string, permissions []string) (JournalPermissionsList, error)
func (SpireClient) CreateEntry ¶
func (client SpireClient) CreateEntry(token, journalID, title, content string, tags []string, context EntryContext) (Entry, error)
func (SpireClient) CreateJournal ¶
func (client SpireClient) CreateJournal(token, name string) (Journal, error)
func (SpireClient) DeleteEntry ¶
func (client SpireClient) DeleteEntry(token, journalID, entryID string) (Entry, error)
func (SpireClient) DeleteJournal ¶
func (client SpireClient) DeleteJournal(token, journalID string) (Journal, error)
func (SpireClient) GetEntry ¶
func (client SpireClient) GetEntry(token, journalID, entryID string) (Entry, error)
func (SpireClient) GetJournal ¶
func (client SpireClient) GetJournal(token, journalID string) (Journal, error)
func (SpireClient) ListEntries ¶
func (client SpireClient) ListEntries(token, journalID string, limit, offset int) (EntryResultsPage, error)
func (SpireClient) ListJournals ¶
func (client SpireClient) ListJournals(token string) (JournalsList, error)
func (SpireClient) Ping ¶
func (client SpireClient) Ping() (string, error)
func (SpireClient) RemoveJournalMember ¶
func (client SpireClient) RemoveJournalMember(token, journalID, memberID, memberType string, permissions []string) (JournalPermissionsList, error)
func (SpireClient) SearchEntries ¶
func (client SpireClient) SearchEntries(token, journalID, searchQuery string, limit, offset int, queryParameters map[string]string) (EntryResultsPage, error)
func (SpireClient) TagEntry ¶
func (client SpireClient) TagEntry(token, journalID, entryID string, tags []string) (Entry, error)
func (SpireClient) UntagEntry ¶
func (client SpireClient) UntagEntry(token, journalID, entryID string, tags []string) (Entry, error)
func (SpireClient) UpdateEntry ¶
func (client SpireClient) UpdateEntry(token, journalID, entryID, title, content string) (Entry, error)
func (SpireClient) UpdateJournal ¶
func (client SpireClient) UpdateJournal(token, journalID, name string) (Journal, error)
type SpireRoutes ¶
func RoutesFromURL ¶
func RoutesFromURL(spireURL string) SpireRoutes
Click to show internal directories.
Click to hide internal directories.