provider

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2023 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewStoryResource

func NewStoryResource() resource.Resource

NewStoryResource is a helper function to simplify the provider implementation.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client - Tines API client.

func NewClient

func NewClient() (*Client, error)

NewClient - Creates a new Tines API client.

func (*Client) DeleteStory

func (c *Client) DeleteStory(ctx context.Context, storyID basetypes.Int64Value) (status int, e error)

func (*Client) ImportStory

func (c *Client) ImportStory(ctx context.Context, storyData []byte) (sr StoryResponse, e error)

ImportStory - Imports a story.

type StoryImportRequest

type StoryImportRequest struct {
	NewName  string                 `json:"new_name"`
	TeamID   int64                  `json:"team_id,omitempty"`
	FolderID int64                  `json:"folder_id,omitempty"`
	Mode     string                 `json:"mode,omitempty"`
	Data     map[string]interface{} `json:"data"`
}

type StoryResponse

type StoryResponse struct {
	ID            int64  `json:"id"`
	Name          string `json:"name"`
	UserID        int64  `json:"user_id"`
	CreatedAt     string `json:"created_at"`
	UpdatedAt     string `json:"updated_at"`
	Description   string `json:"description"`
	GUID          string `json:"guid"`
	KeepEventsFor int64  `json:"keep_events_for"`
	Disabled      bool   `json:"disabled"`
	Priority      bool   `json:"priority"`
	TeamID        int64  `json:"team_id"`
	FolderID      int64  `json:"folder_id"`
}

StoryResponse - Response from Tines API when importing a story.

type TinesProvider

type TinesProvider struct {
	// contains filtered or unexported fields
}

TinesProvider defines the provider implementation.

func (*TinesProvider) Configure

Configure initializes the Tines client.

func (*TinesProvider) DataSources

func (p *TinesProvider) DataSources(ctx context.Context) []func() datasource.DataSource

DataSources returns the available data sources (currently none).

func (*TinesProvider) Metadata

func (*TinesProvider) Resources

func (p *TinesProvider) Resources(ctx context.Context) []func() resource.Resource

Resources returns the available Story Resource.

func (*TinesProvider) Schema

Schema describes the schema for Tines provider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL