Documentation ¶
Index ¶
- Constants
- func New(version string) func() provider.Provider
- func NewTokenResource() resource.Resource
- type Client
- func (c *Client) Delete(endpoint string) (*http.Response, error)
- func (c *Client) Do(method, endpoint string, payload *bytes.Buffer, contentType string) (*http.Response, error)
- func (c *Client) Get(endpoint string) (*http.Response, error)
- func (c *Client) Patch(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)
- func (c *Client) Post(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)
- func (c *Client) Put(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)
- func (c *Client) PutOnly(endpoint string) (*http.Response, error)
- type Error
- type MapBoxProvider
- func (p *MapBoxProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *MapBoxProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *MapBoxProvider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *MapBoxProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *MapBoxProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type MapBoxProviderModel
- type TokenResource
- func (r *TokenResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *TokenResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *TokenResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *TokenResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *TokenResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *TokenResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *TokenResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *TokenResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type TokenResourceModel
Constants ¶
View Source
const ( // MapBoxEndpoint is the fqdn used to talk to bitbucket MapBoxEndpoint string = "https://api.mapbox.com/" )
Variables ¶
This section is empty.
Functions ¶
func NewTokenResource ¶
Types ¶
type Client ¶
Client is the base internal Client to talk to bitbuckets API. This should be a username and password the password should be a app-password.
func (*Client) Do ¶
func (c *Client) Do(method, endpoint string, payload *bytes.Buffer, contentType string) (*http.Response, error)
Do Will just call the bitbucket api but also add auth to it and some extra headers
type Error ¶
type Error struct { APIError struct { Message string `json:"message,omitempty"` } `json:"error,omitempty"` Type string `json:"type,omitempty"` StatusCode int Endpoint string }
Error represents a error from the bitbucket api.
type MapBoxProvider ¶
type MapBoxProvider struct {
// contains filtered or unexported fields
}
MapBoxProvider defines the provider implementation.
func (*MapBoxProvider) Configure ¶
func (p *MapBoxProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
func (*MapBoxProvider) DataSources ¶
func (p *MapBoxProvider) DataSources(ctx context.Context) []func() datasource.DataSource
func (*MapBoxProvider) Metadata ¶
func (p *MapBoxProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
func (*MapBoxProvider) Resources ¶
func (p *MapBoxProvider) Resources(ctx context.Context) []func() resource.Resource
func (*MapBoxProvider) Schema ¶
func (p *MapBoxProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
type MapBoxProviderModel ¶
MapBoxProviderModel describes the provider data model.
type TokenResource ¶
type TokenResource struct {
// contains filtered or unexported fields
}
TokenResource defines the resource implementation.
func (*TokenResource) Configure ¶
func (r *TokenResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*TokenResource) Create ¶
func (r *TokenResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*TokenResource) Delete ¶
func (r *TokenResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*TokenResource) ImportState ¶
func (r *TokenResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*TokenResource) Metadata ¶
func (r *TokenResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*TokenResource) Read ¶
func (r *TokenResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*TokenResource) Schema ¶
func (r *TokenResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*TokenResource) Update ¶
func (r *TokenResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type TokenResourceModel ¶
type TokenResourceModel struct { AllowedUrls types.Set `tfsdk:"allowed_urls"` Id types.String `tfsdk:"id"` Note types.String `tfsdk:"note"` Scopes types.Set `tfsdk:"scopes"` Token types.String `tfsdk:"token"` Username types.String `tfsdk:"username"` }
TokenResourceModel describes the resource data model.
Click to show internal directories.
Click to hide internal directories.