Documentation ¶
Overview ¶
package writer
Index ¶
- Constants
- func EnsureGitHubAccessToken(ctx context.Context, writer_uri string, token_uri string) (string, error)
- func NewGitHubAPIPullRequestWriter(ctx context.Context, uri string) (wof_writer.Writer, error)
- func NewGitHubAPIWriter(ctx context.Context, uri string) (wof_writer.Writer, error)
- type GitHubAPIPullRequestWriter
- type GitHubAPIWriter
- type GitHubAPIWriterCommitTemplates
Constants ¶
View Source
const DEFAULT_BRANCH string = "main"
View Source
const GITHUBAPI_PR_SCHEME string = "githubapi-pr"
View Source
const GITHUBAPI_SCHEME string = "githubapi"
Variables ¶
This section is empty.
Functions ¶
func EnsureGitHubAccessToken ¶ added in v0.6.1
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 NewGitHubAPIPullRequestWriter ¶ added in v0.7.0
func NewGitHubAPIWriter ¶
Types ¶
type GitHubAPIPullRequestWriter ¶ added in v0.7.0
type GitHubAPIPullRequestWriter struct { wof_writer.Writer // contains filtered or unexported fields }
func (*GitHubAPIPullRequestWriter) Close ¶ added in v0.7.0
func (wr *GitHubAPIPullRequestWriter) Close(ctx context.Context) error
func (*GitHubAPIPullRequestWriter) Write ¶ added in v0.7.0
func (wr *GitHubAPIPullRequestWriter) 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) Close ¶ added in v0.7.0
func (wr *GitHubAPIWriter) Close(ctx context.Context) error
func (*GitHubAPIWriter) Write ¶
func (wr *GitHubAPIWriter) Write(ctx context.Context, uri string, fh io.ReadSeeker) (int64, error)
Click to show internal directories.
Click to hide internal directories.