Documentation ¶
Overview ¶
package writer
Index ¶
- Constants
- func EnsureGitHubAccessToken(ctx context.Context, writer_uri string, token_uri string) (string, error)
- func NewGitHubAPIBranchWriter(ctx context.Context, uri string) (wof_writer.Writer, error)
- func NewGitHubAPIPullRequestWriter(ctx context.Context, uri string) (wof_writer.Writer, error)
- func NewGitHubAPITreeWriter(ctx context.Context, uri string) (wof_writer.Writer, error)
- func NewGitHubAPIWriter(ctx context.Context, uri string) (wof_writer.Writer, error)
- type GitHubAPIBranchWriter
- func (wr *GitHubAPIBranchWriter) Close(ctx context.Context) error
- func (wr *GitHubAPIBranchWriter) Flush(ctx context.Context) error
- func (wr *GitHubAPIBranchWriter) SetLogger(ctx context.Context, logger *log.Logger) error
- func (wr *GitHubAPIBranchWriter) Write(ctx context.Context, uri string, r io.ReadSeeker) (int64, error)
- func (wr *GitHubAPIBranchWriter) WriterURI(ctx context.Context, key string) string
- type GitHubAPIPullRequestWriter
- func (wr *GitHubAPIPullRequestWriter) Close(ctx context.Context) error
- func (wr *GitHubAPIPullRequestWriter) Flush(ctx context.Context) error
- func (wr *GitHubAPIPullRequestWriter) SetLogger(ctx context.Context, logger *log.Logger) error
- func (wr *GitHubAPIPullRequestWriter) Write(ctx context.Context, uri string, r io.ReadSeeker) (int64, error)
- func (wr *GitHubAPIPullRequestWriter) WriterURI(ctx context.Context, key string) string
- type GitHubAPITreeWriter
- func (wr *GitHubAPITreeWriter) Close(ctx context.Context) error
- func (wr *GitHubAPITreeWriter) Flush(ctx context.Context) error
- func (wr *GitHubAPITreeWriter) SetLogger(ctx context.Context, logger *log.Logger) error
- func (wr *GitHubAPITreeWriter) Write(ctx context.Context, uri string, r io.ReadSeeker) (int64, error)
- func (wr *GitHubAPITreeWriter) WriterURI(ctx context.Context, key string) string
- type GitHubAPIWriter
- func (wr *GitHubAPIWriter) Close(ctx context.Context) error
- func (wr *GitHubAPIWriter) Flush(ctx context.Context) error
- func (wr *GitHubAPIWriter) SetLogger(ctx context.Context, logger *log.Logger) error
- func (wr *GitHubAPIWriter) Write(ctx context.Context, uri string, fh io.ReadSeeker) (int64, error)
- func (wr *GitHubAPIWriter) WriterURI(ctx context.Context, key string) string
- type GitHubAPIWriterCommitTemplates
Constants ¶
View Source
const DEFAULT_BRANCH string = "main"
View Source
const GITHUBAPI_BRANCH_SCHEME string = "githubapi-branch"
View Source
const GITHUBAPI_PR_SCHEME string = "githubapi-pr"
View Source
const GITHUBAPI_SCHEME string = "githubapi"
View Source
const GITHUBAPI_TREE_SCHEME string = "githubapi-tree"
Variables ¶
This section is empty.
Functions ¶
func EnsureGitHubAccessToken ¶
func EnsureGitHubAccessToken(ctx context.Context, writer_uri string, token_uri string) (string, error)
EnsureGitHubAccessToken ensures that 'writer_uri' contains a '?access_token=VALUE' parameter. This only applies if the scheme is `githubapi://`. If not the method returns the original 'writer_uri' value. If the 'writer_uri' contains an empty `access_token` parameter or the value is "{access_token}" then the method will replace parameter with the value derived from 'token_uri' which is expected to be a valid `gocloud.dev/runtimevar` URI.
func NewGitHubAPIBranchWriter ¶ added in v2.1.0
func NewGitHubAPITreeWriter ¶
func NewGitHubAPIWriter ¶
Types ¶
type GitHubAPIBranchWriter ¶ added in v2.1.0
type GitHubAPIBranchWriter struct { wof_writer.Writer // contains filtered or unexported fields }
func (*GitHubAPIBranchWriter) Close ¶ added in v2.1.0
func (wr *GitHubAPIBranchWriter) Close(ctx context.Context) error
func (*GitHubAPIBranchWriter) Flush ¶ added in v2.1.0
func (wr *GitHubAPIBranchWriter) Flush(ctx context.Context) error
func (*GitHubAPIBranchWriter) Write ¶ added in v2.1.0
func (wr *GitHubAPIBranchWriter) Write(ctx context.Context, uri string, r io.ReadSeeker) (int64, error)
type GitHubAPIPullRequestWriter ¶
type GitHubAPIPullRequestWriter struct { wof_writer.Writer // contains filtered or unexported fields }
func (*GitHubAPIPullRequestWriter) Close ¶
func (wr *GitHubAPIPullRequestWriter) Close(ctx context.Context) error
func (*GitHubAPIPullRequestWriter) Flush ¶
func (wr *GitHubAPIPullRequestWriter) Flush(ctx context.Context) error
func (*GitHubAPIPullRequestWriter) Write ¶
func (wr *GitHubAPIPullRequestWriter) Write(ctx context.Context, uri string, r io.ReadSeeker) (int64, error)
type GitHubAPITreeWriter ¶
type GitHubAPITreeWriter struct { wof_writer.Writer // contains filtered or unexported fields }
func (*GitHubAPITreeWriter) Write ¶
func (wr *GitHubAPITreeWriter) Write(ctx context.Context, uri string, r io.ReadSeeker) (int64, error)
type GitHubAPIWriter ¶
type GitHubAPIWriter struct { wof_writer.Writer // contains filtered or unexported fields }
func (*GitHubAPIWriter) Write ¶
func (wr *GitHubAPIWriter) Write(ctx context.Context, uri string, fh io.ReadSeeker) (int64, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.