Skip to content
Snippets Groups Projects
client.go 1.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • // Code generated by goa v3.7.0, DO NOT EDIT.
    //
    // taskList client
    //
    // Command:
    // $ goa gen code.vereign.com/gaiax/tsa/task/design
    
    package tasklist
    
    import (
    	"context"
    
    	goa "goa.design/goa/v3/pkg"
    )
    
    // Client is the "taskList" service client.
    type Client struct {
    
    Yordan Kinkov's avatar
    Yordan Kinkov committed
    	CreateEndpoint         goa.Endpoint
    	TaskListResultEndpoint goa.Endpoint
    
    }
    
    // NewClient initializes a "taskList" service client given the endpoints.
    
    Yordan Kinkov's avatar
    Yordan Kinkov committed
    func NewClient(create, taskListResult goa.Endpoint) *Client {
    
    	return &Client{
    
    Yordan Kinkov's avatar
    Yordan Kinkov committed
    		CreateEndpoint:         create,
    		TaskListResultEndpoint: taskListResult,
    
    	}
    }
    
    // Create calls the "Create" endpoint of the "taskList" service.
    func (c *Client) Create(ctx context.Context, p *CreateTaskListRequest) (res *CreateTaskListResult, err error) {
    	var ires interface{}
    	ires, err = c.CreateEndpoint(ctx, p)
    	if err != nil {
    		return
    	}
    	return ires.(*CreateTaskListResult), nil
    }
    
    Yordan Kinkov's avatar
    Yordan Kinkov committed
    
    // TaskListResult calls the "TaskListResult" endpoint of the "taskList" service.
    
    Yordan Kinkov's avatar
    Yordan Kinkov committed
    func (c *Client) TaskListResult(ctx context.Context, p *TaskListResultRequest) (res *TaskListStatus, err error) {
    
    Yordan Kinkov's avatar
    Yordan Kinkov committed
    	var ires interface{}
    	ires, err = c.TaskListResultEndpoint(ctx, p)
    	if err != nil {
    		return
    	}
    
    Yordan Kinkov's avatar
    Yordan Kinkov committed
    	return ires.(*TaskListStatus), nil