honeycode

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Overview

Package honeycode provides the client and types for making API requests to Honeycode.

Amazon Honeycode is a fully managed service that allows you to quickly build mobile and web apps for teams—without programming. Build Honeycode apps for managing almost anything, like projects, customers, operations, approvals, resources, and even your team.

See https://docs.aws.amazon.com/goto/WebAPI/honeycode-2020-03-01 for more information on this service.

See honeycode package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/honeycode/

Using the Client

To use Honeycode with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the Honeycode client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/honeycode/#New

Index

Constants

View Source
const (
	ServiceName = "Honeycode" // Service's name
	ServiceID   = "Honeycode" // Service's identifier
	EndpointsID = "honeycode" // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeAccessDeniedException for service response error code
	// "AccessDeniedException".
	//
	// You do not have sufficient access to perform this action. Check that the
	// workbook is owned by you and your IAM policy allows access to the screen/automation
	// in the request.
	ErrCodeAccessDeniedException = "AccessDeniedException"

	// ErrCodeAutomationExecutionException for service response error code
	// "AutomationExecutionException".
	//
	// The automation execution did not end successfully.
	ErrCodeAutomationExecutionException = "AutomationExecutionException"

	// ErrCodeAutomationExecutionTimeoutException for service response error code
	// "AutomationExecutionTimeoutException".
	//
	// The automation execution timed out.
	ErrCodeAutomationExecutionTimeoutException = "AutomationExecutionTimeoutException"

	// ErrCodeInternalServerException for service response error code
	// "InternalServerException".
	//
	// There were unexpected errors from the server.
	ErrCodeInternalServerException = "InternalServerException"

	// ErrCodeRequestTimeoutException for service response error code
	// "RequestTimeoutException".
	//
	// The request timed out.
	ErrCodeRequestTimeoutException = "RequestTimeoutException"

	// ErrCodeResourceNotFoundException for service response error code
	// "ResourceNotFoundException".
	//
	// A Workbook, App, Screen or Screen Automation was not found with the given
	// ID.
	ErrCodeResourceNotFoundException = "ResourceNotFoundException"

	// ErrCodeServiceUnavailableException for service response error code
	// "ServiceUnavailableException".
	//
	// Remote service is unreachable.
	ErrCodeServiceUnavailableException = "ServiceUnavailableException"

	// ErrCodeThrottlingException for service response error code
	// "ThrottlingException".
	//
	// Tps(transactions per second) rate reached.
	ErrCodeThrottlingException = "ThrottlingException"

	// ErrCodeValidationException for service response error code
	// "ValidationException".
	//
	// Request is invalid. The message in the response contains details on why the
	// request is invalid.
	ErrCodeValidationException = "ValidationException"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*aws.Client
}

Client provides the API operation methods for making requests to Honeycode. See this package's package overview docs for details on the service.

The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := honeycode.New(myConfig)

func (*Client) GetScreenDataRequest

func (c *Client) GetScreenDataRequest(input *GetScreenDataInput) GetScreenDataRequest

GetScreenDataRequest returns a request value for making API operation for Amazon Honeycode.

The GetScreenData API allows retrieval of data from a screen in a Honeycode app. The API allows setting local variables in the screen to filter, sort or otherwise affect what will be displayed on the screen.

// Example sending a request using GetScreenDataRequest.
req := client.GetScreenDataRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/honeycode-2020-03-01/GetScreenData

func (*Client) InvokeScreenAutomationRequest

func (c *Client) InvokeScreenAutomationRequest(input *InvokeScreenAutomationInput) InvokeScreenAutomationRequest

InvokeScreenAutomationRequest returns a request value for making API operation for Amazon Honeycode.

The InvokeScreenAutomation API allows invoking an action defined in a screen in a Honeycode app. The API allows setting local variables, which can then be used in the automation being invoked. This allows automating the Honeycode app interactions to write, update or delete data in the workbook.

// Example sending a request using InvokeScreenAutomationRequest.
req := client.InvokeScreenAutomationRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/honeycode-2020-03-01/InvokeScreenAutomation

type ColumnMetadata

type ColumnMetadata struct {

	// The format of the column.
	//
	// Format is a required field
	Format Format `locationName:"format" type:"string" required:"true" enum:"true"`

	// The name of the column.
	//
	// Name is a required field
	Name *string `locationName:"name" type:"string" required:"true" sensitive:"true"`
	// contains filtered or unexported fields
}

Metadata for column in the table.

func (ColumnMetadata) MarshalFields

func (s ColumnMetadata) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ColumnMetadata) String

func (s ColumnMetadata) String() string

String returns the string representation

type DataItem

type DataItem struct {

	// The formatted value of the data. e.g. John Smith.
	FormattedValue *string `locationName:"formattedValue" type:"string"`

	// The overrideFormat is optional and is specified only if a particular row
	// of data has a different format for the data than the default format defined
	// on the screen or the table.
	OverrideFormat Format `locationName:"overrideFormat" type:"string" enum:"true"`

	// The raw value of the data. e.g. jsmith@example.com
	RawValue *string `locationName:"rawValue" type:"string"`
	// contains filtered or unexported fields
}

The data in a particular data cell defined on the screen.

func (DataItem) MarshalFields

func (s DataItem) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (DataItem) String

func (s DataItem) String() string

String returns the string representation

type Format

type Format string
const (
	FormatAuto       Format = "AUTO"
	FormatNumber     Format = "NUMBER"
	FormatCurrency   Format = "CURRENCY"
	FormatDate       Format = "DATE"
	FormatTime       Format = "TIME"
	FormatDateTime   Format = "DATE_TIME"
	FormatPercentage Format = "PERCENTAGE"
	FormatText       Format = "TEXT"
	FormatAccounting Format = "ACCOUNTING"
	FormatContact    Format = "CONTACT"
	FormatRowlink    Format = "ROWLINK"
)

Enum values for Format

func (Format) MarshalValue

func (enum Format) MarshalValue() (string, error)

func (Format) MarshalValueBuf

func (enum Format) MarshalValueBuf(b []byte) ([]byte, error)

type GetScreenDataInput

type GetScreenDataInput struct {

	// The ID of the app that contains the screem.
	//
	// AppId is a required field
	AppId *string `locationName:"appId" type:"string" required:"true"`

	// The number of results to be returned on a single page. Specify a number between
	// 1 and 100. The maximum value is 100.
	//
	// This parameter is optional. If you don't specify this parameter, the default
	// page size is 100.
	MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`

	// This parameter is optional. If a nextToken is not specified, the API returns
	// the first page of data.
	//
	// Pagination tokens expire after 1 hour. If you use a token that was returned
	// more than an hour back, the API will throw ValidationException.
	NextToken *string `locationName:"nextToken" min:"1" type:"string"`

	// The ID of the screen.
	//
	// ScreenId is a required field
	ScreenId *string `locationName:"screenId" type:"string" required:"true"`

	// Variables are optional and are needed only if the screen requires them to
	// render correctly. Variables are specified as a map where the key is the name
	// of the variable as defined on the screen. The value is an object which currently
	// has only one property, rawValue, which holds the value of the variable to
	// be passed to the screen.
	Variables map[string]VariableValue `locationName:"variables" type:"map" sensitive:"true"`

	// The ID of the workbook that contains the screen.
	//
	// WorkbookId is a required field
	WorkbookId *string `locationName:"workbookId" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetScreenDataInput) MarshalFields

func (s GetScreenDataInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (GetScreenDataInput) String

func (s GetScreenDataInput) String() string

String returns the string representation

func (*GetScreenDataInput) Validate

func (s *GetScreenDataInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetScreenDataOutput

type GetScreenDataOutput struct {

	// Provides the pagination token to load the next page if there are more results
	// matching the request. If a pagination token is not present in the response,
	// it means that all data matching the query has been loaded.
	NextToken *string `locationName:"nextToken" min:"1" type:"string"`

	// A map of all the rows on the screen keyed by block name.
	//
	// Results is a required field
	Results map[string]ResultSet `locationName:"results" type:"map" required:"true"`

	// Indicates the cursor of the workbook at which the data returned by this workbook
	// is read. Workbook cursor keeps increasing with every update and the increments
	// are not sequential.
	//
	// WorkbookCursor is a required field
	WorkbookCursor *int64 `locationName:"workbookCursor" type:"long" required:"true"`
	// contains filtered or unexported fields
}

func (GetScreenDataOutput) MarshalFields

func (s GetScreenDataOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (GetScreenDataOutput) String

func (s GetScreenDataOutput) String() string

String returns the string representation

type GetScreenDataRequest

type GetScreenDataRequest struct {
	*aws.Request
	Input *GetScreenDataInput
	Copy  func(*GetScreenDataInput) GetScreenDataRequest
}

GetScreenDataRequest is the request type for the GetScreenData API operation.

func (GetScreenDataRequest) Send

Send marshals and sends the GetScreenData API request.

type GetScreenDataResponse

type GetScreenDataResponse struct {
	*GetScreenDataOutput
	// contains filtered or unexported fields
}

GetScreenDataResponse is the response type for the GetScreenData API operation.

func (*GetScreenDataResponse) SDKResponseMetdata

func (r *GetScreenDataResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetScreenData request.

type InvokeScreenAutomationInput

type InvokeScreenAutomationInput struct {

	// The ID of the app that contains the screen automation.
	//
	// AppId is a required field
	AppId *string `location:"uri" locationName:"appId" type:"string" required:"true"`

	// The request token for performing the automation action. Request tokens help
	// to identify duplicate requests. If a call times out or fails due to a transient
	// error like a failed network connection, you can retry the call with the same
	// request token. The service ensures that if the first call using that request
	// token is successfully performed, the second call will return the response
	// of the previous call rather than performing the action again.
	//
	// Note that request tokens are valid only for a few minutes. You cannot use
	// request tokens to dedupe requests spanning hours or days.
	ClientRequestToken *string `locationName:"clientRequestToken" min:"32" type:"string"`

	// The row ID for the automation if the automation is defined inside a block
	// with source or list.
	RowId *string `locationName:"rowId" type:"string"`

	// The ID of the automation action to be performed.
	//
	// ScreenAutomationId is a required field
	ScreenAutomationId *string `location:"uri" locationName:"automationId" type:"string" required:"true"`

	// The ID of the screen that contains the screen automation.
	//
	// ScreenId is a required field
	ScreenId *string `location:"uri" locationName:"screenId" type:"string" required:"true"`

	// Variables are optional and are needed only if the screen requires them to
	// render correctly. Variables are specified as a map where the key is the name
	// of the variable as defined on the screen. The value is an object which currently
	// has only one property, rawValue, which holds the value of the variable to
	// be passed to the screen.
	Variables map[string]VariableValue `locationName:"variables" type:"map" sensitive:"true"`

	// The ID of the workbook that contains the screen automation.
	//
	// WorkbookId is a required field
	WorkbookId *string `location:"uri" locationName:"workbookId" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (InvokeScreenAutomationInput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (InvokeScreenAutomationInput) String

String returns the string representation

func (*InvokeScreenAutomationInput) Validate

func (s *InvokeScreenAutomationInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type InvokeScreenAutomationOutput

type InvokeScreenAutomationOutput struct {

	// The updated workbook cursor after performing the automation action.
	//
	// WorkbookCursor is a required field
	WorkbookCursor *int64 `locationName:"workbookCursor" type:"long" required:"true"`
	// contains filtered or unexported fields
}

func (InvokeScreenAutomationOutput) MarshalFields

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (InvokeScreenAutomationOutput) String

String returns the string representation

type InvokeScreenAutomationRequest

type InvokeScreenAutomationRequest struct {
	*aws.Request
	Input *InvokeScreenAutomationInput
	Copy  func(*InvokeScreenAutomationInput) InvokeScreenAutomationRequest
}

InvokeScreenAutomationRequest is the request type for the InvokeScreenAutomation API operation.

func (InvokeScreenAutomationRequest) Send

Send marshals and sends the InvokeScreenAutomation API request.

type InvokeScreenAutomationResponse

type InvokeScreenAutomationResponse struct {
	*InvokeScreenAutomationOutput
	// contains filtered or unexported fields
}

InvokeScreenAutomationResponse is the response type for the InvokeScreenAutomation API operation.

func (*InvokeScreenAutomationResponse) SDKResponseMetdata

func (r *InvokeScreenAutomationResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the InvokeScreenAutomation request.

type ResultRow

type ResultRow struct {

	// List of all the data cells in a row.
	//
	// DataItems is a required field
	DataItems []DataItem `locationName:"dataItems" type:"list" required:"true"`

	// The ID for a particular row.
	RowId *string `locationName:"rowId" type:"string"`
	// contains filtered or unexported fields
}

A single row in the ResultSet.

func (ResultRow) MarshalFields

func (s ResultRow) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ResultRow) String

func (s ResultRow) String() string

String returns the string representation

type ResultSet

type ResultSet struct {

	// List of headers for all the data cells in the block. The header identifies
	// the name and default format of the data cell. Data cells appear in the same
	// order in all rows as defined in the header. The names and formats are not
	// repeated in the rows. If a particular row does not have a value for a data
	// cell, a blank value is used.
	//
	// For example, a task list that displays the task name, due date and assigned
	// person might have headers [ { "name": "Task Name"}, {"name": "Due Date",
	// "format": "DATE"}, {"name": "Assigned", "format": "CONTACT"} ]. Every row
	// in the result will have the task name as the first item, due date as the
	// second item and assigned person as the third item. If a particular task does
	// not have a due date, that row will still have a blank value in the second
	// element and the assigned person will still be in the third element.
	//
	// Headers is a required field
	Headers []ColumnMetadata `locationName:"headers" type:"list" required:"true"`

	// List of rows returned by the request. Each row has a row Id and a list of
	// data cells in that row. The data cells will be present in the same order
	// as they are defined in the header.
	//
	// Rows is a required field
	Rows []ResultRow `locationName:"rows" type:"list" required:"true"`
	// contains filtered or unexported fields
}

ResultSet contains the results of the request for a single block or list defined on the screen.

func (ResultSet) MarshalFields

func (s ResultSet) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ResultSet) String

func (s ResultSet) String() string

String returns the string representation

type VariableValue

type VariableValue struct {

	// Raw value of the variable.
	//
	// RawValue is a required field
	RawValue *string `locationName:"rawValue" type:"string" required:"true"`
	// contains filtered or unexported fields
}

The input variables to the app to be used by the InvokeScreenAutomation action request.

func (VariableValue) MarshalFields

func (s VariableValue) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (VariableValue) String

func (s VariableValue) String() string

String returns the string representation

func (*VariableValue) Validate

func (s *VariableValue) Validate() error

Validate inspects the fields of the type to determine if they are valid.

Directories

Path Synopsis
Package honeycodeiface provides an interface to enable mocking the Amazon Honeycode service client for testing your code.
Package honeycodeiface provides an interface to enable mocking the Amazon Honeycode service client for testing your code.

Jump to

Keyboard shortcuts

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