imports

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "Imports"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [1]string{"List"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func NewListEndpoint

func NewListEndpoint(s Service) goa.Endpoint

NewListEndpoint returns an endpoint function that calls the method "List" of service "Imports".

Types

type Client

type Client struct {
	ListEndpoint goa.Endpoint
}

Client is the "Imports" service client.

func NewClient

func NewClient(list goa.Endpoint) *Client

NewClient initializes a "Imports" service client given the endpoints.

func (*Client) List

func (c *Client) List(ctx context.Context) (res []*Import, err error)

List calls the "List" endpoint of the "Imports" service.

type Endpoints

type Endpoints struct {
	List goa.Endpoint
}

Endpoints wraps the "Imports" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "Imports" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "Imports" service endpoints.

type Import

type Import struct {
	// Unique ID for the import
	ID int
	// Subscription ID, associating this import to a specific subscription
	SubscriptionID string
	// Postgres table schema
	Schema string
	// Postgres table name
	TableName string
	// Import was completed at this time
	CompletedAt *string
	// Import was created at this time
	CreatedAt string
	// Import was last updated at this time
	UpdatedAt string
	// Import was expired at this time
	ExpiredAt *string
	// Last import error
	Error *string
	// Count of error attempts
	ErrorCount int
	// Timestamp of last error, only reset on error
	LastErrorAt *string
	// Count of rows processed
	RowsProcessedTotal int64
}

Import job for a Postgres table

type Service

type Service interface {
	// List all imports
	List(context.Context) (res []*Import, err error)
}

Manage table imports, scoped to the server subscription ID

Jump to

Keyboard shortcuts

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