Documentation
¶
Index ¶
- type CacheData
- type PickledCache
- type PickledCachedClient
- func (c *PickledCachedClient) Get(url string, useStableAPI bool) *client.Page
- func (c *PickledCachedClient) GetWithContext(ctx context.Context, url string, useStableAPI bool) *client.Page
- func (c *PickledCachedClient) Patch(url string, useStableAPI bool, data map[string]string) (int, error)
- func (c *PickledCachedClient) PatchWithContext(ctx context.Context, url string, useStableAPI bool, data map[string]string) (int, error)
- func (c *PickledCachedClient) Post(url string, useStableAPI bool, data map[string]string) (int, error)
- func (c *PickledCachedClient) PostWithContext(ctx context.Context, url string, useStableAPI bool, data map[string]string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PickledCache ¶
PickledCache represents a pickled cache
func NewCache ¶
func NewCache() (*PickledCache, error)
NewCache will create and initialise a new PickledCached file
func (*PickledCache) Load ¶
func (pc *PickledCache) Load() error
Load retieves the cache data from file and puts in the cache data member
func (PickledCache) Save ¶
func (pc PickledCache) Save() error
Save dumps the in-memory cache data to file
type PickledCachedClient ¶
type PickledCachedClient struct { APIToken *authorisation.GithubToken APIURL string // contains filtered or unexported fields }
PickledCachedClient represents a Github client that caches data
func NewClient ¶
func NewClient() *PickledCachedClient
NewClient creates and initialises a new PickledCachedClient
func (*PickledCachedClient) Get ¶
func (c *PickledCachedClient) Get( url string, useStableAPI bool, ) *client.Page
Get executes an HTTP GET operation, returning a Page object (that may link to further pages if there are more results to come).
func (*PickledCachedClient) GetWithContext ¶
func (c *PickledCachedClient) GetWithContext( ctx context.Context, url string, useStableAPI bool, ) *client.Page
GetWithContext executes an HTTP GET operation, returning a Page object (that may link to further pages if there are more results to come). It may be cancelled via the context.
func (*PickledCachedClient) Patch ¶
func (c *PickledCachedClient) Patch( url string, useStableAPI bool, data map[string]string, ) (int, error)
Patch executes an HTTP PATCH operation, returning a status code.
func (*PickledCachedClient) PatchWithContext ¶
func (c *PickledCachedClient) PatchWithContext( ctx context.Context, url string, useStableAPI bool, data map[string]string, ) (int, error)
PatchWithContext executes an HTTP PATCH operation, returning a status code. It may be cancelled via the context.