Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionFn ¶
type OptionFn func(*Options)
OptionFn represents any function capable of customising or providing options
func WithContextValue ¶
WithContextValue sets a value on the options context. It will override any existing value set with the same key
func WithExtraFunctions ¶
func WithExtraFunctions() OptionFn
WithExtraFunctions configures the extension to also register the bundled utility sql routines.
func WithGitHub ¶
func WithGitHub() OptionFn
WithGitHub configures the extension to also register the GitHub related tables and funcs
func WithGitHubClientGetter ¶
WithGitHubClientGetter configures a way to use a custom GitHubv4 client
func WithRepoLocator ¶
func WithRepoLocator(loc services.RepoLocator) OptionFn
WithRepoLocator uses the provided locator implementation for locating and opening git repositories.
type Options ¶
type Options struct { Locator services.RepoLocator // ExtraFunctions is used to determine whether or not to register the extra utility functions // bundled with this extension ExtraFunctions bool // GitHub set to true to register the GitHub tables/funcs GitHub bool // GitHubClientGetter overrides the default GitHub v4 client GitHubClientGetter func() *githubv4.Client // Context is a key-value store to pass along values to the underlying extensions Context services.Context }
Options is the container for various different options and configurations that can be passed to tables.RegisterFn to conditionally include or tweak the extension module's behaviour
type RepoLocatorFn ¶
RepoLocatorFn is an adapter type that adapts any function with compatible signature to a RepoLocator instance.