client

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAppAppsPath

func DeleteAppAppsPath(appID string) string

DeleteAppAppsPath computes a request path to the deleteApp action of apps.

func GetAppsPath

func GetAppsPath(appID string) string

GetAppsPath computes a request path to the get action of apps.

func GetMyAppsAppsPath

func GetMyAppsAppsPath() string

GetMyAppsAppsPath computes a request path to the getMyApps action of apps.

func GetUserAppsAppsPath

func GetUserAppsAppsPath(userID string) string

GetUserAppsAppsPath computes a request path to the getUserApps action of apps.

func RegenerateClientSecretAppsPath

func RegenerateClientSecretAppsPath(appID string) string

RegenerateClientSecretAppsPath computes a request path to the regenerateClientSecret action of apps.

func RegisterAppAppsPath

func RegisterAppAppsPath() string

RegisterAppAppsPath computes a request path to the registerApp action of apps.

func UpdateAppAppsPath

func UpdateAppAppsPath(appID string) string

UpdateAppAppsPath computes a request path to the updateApp action of apps.

func VerifyAppAppsPath

func VerifyAppAppsPath() string

VerifyAppAppsPath computes a request path to the verifyApp action of apps.

Types

type AppCredentialsPayload

type AppCredentialsPayload struct {
	// The app ID
	ID string `form:"id" json:"id" yaml:"id" xml:"id"`
	// The app secret
	Secret string `form:"secret" json:"secret" yaml:"secret" xml:"secret"`
}

App ID+secret credentials

func (*AppCredentialsPayload) Validate

func (ut *AppCredentialsPayload) Validate() (err error)

Validate validates the AppCredentialsPayload type instance.

type AppPayload

type AppPayload struct {
	// Description of the app
	Description *string `form:"description,omitempty" json:"description,omitempty" yaml:"description,omitempty" xml:"description,omitempty"`
	// App domain
	Domain *string `form:"domain,omitempty" json:"domain,omitempty" yaml:"domain,omitempty" xml:"domain,omitempty"`
	// Name of the app
	Name string `form:"name" json:"name" yaml:"name" xml:"name"`
}

Payload for the client apps

func (*AppPayload) Validate

func (ut *AppPayload) Validate() (err error)

Validate validates the AppPayload type instance.

type Apps

type Apps struct {
	// Description of the app
	Description string `form:"description" json:"description" yaml:"description" xml:"description"`
	// App domain
	Domain string `form:"domain" json:"domain" yaml:"domain" xml:"domain"`
	// Unique app ID
	ID string `form:"id" json:"id" yaml:"id" xml:"id"`
	// Name of the app
	Name string `form:"name" json:"name" yaml:"name" xml:"name"`
	// User ID
	Owner string `form:"owner" json:"owner" yaml:"owner" xml:"owner"`
	// Time when app is registered
	RegisteredAt int `form:"registeredAt" json:"registeredAt" yaml:"registeredAt" xml:"registeredAt"`
}

apps media type (default view)

Identifier: application/vnd.goa.apps+json; view=default

func (*Apps) Validate

func (mt *Apps) Validate() (err error)

Validate validates the Apps media type instance.

type Client

type Client struct {
	*goaclient.Client
	Encoder *goa.HTTPEncoder
	Decoder *goa.HTTPDecoder
}

Client is the apps-management service client.

func New

func New(c goaclient.Doer) *Client

New instantiates the client.

func (*Client) DecodeApps

func (c *Client) DecodeApps(resp *http.Response) (*Apps, error)

DecodeApps decodes the Apps instance encoded in resp body.

func (*Client) DecodeErrorResponse

func (c *Client) DecodeErrorResponse(resp *http.Response) (*goa.ErrorResponse, error)

DecodeErrorResponse decodes the ErrorResponse instance encoded in resp body.

func (*Client) DecodeRegApps

func (c *Client) DecodeRegApps(resp *http.Response) (*RegApps, error)

DecodeRegApps decodes the RegApps instance encoded in resp body.

func (*Client) DeleteAppApps

func (c *Client) DeleteAppApps(ctx context.Context, path string) (*http.Response, error)

Delete an app

func (*Client) DownloadSwaggerJSON

func (c *Client) DownloadSwaggerJSON(ctx context.Context, dest string) (int64, error)

DownloadSwaggerJSON downloads swagger.json and writes it to the file dest. It returns the number of bytes downloaded in case of success.

func (*Client) DownloadSwaggerUI

func (c *Client) DownloadSwaggerUI(ctx context.Context, filename, dest string) (int64, error)

DownloadSwaggerUI downloads /files with the given filename and writes it to the file dest. It returns the number of bytes downloaded in case of success.

func (*Client) GetApps

func (c *Client) GetApps(ctx context.Context, path string) (*http.Response, error)

Get app by id

func (*Client) GetMyAppsApps

func (c *Client) GetMyAppsApps(ctx context.Context, path string) (*http.Response, error)

Get all user's apps

func (*Client) GetUserAppsApps

func (c *Client) GetUserAppsApps(ctx context.Context, path string) (*http.Response, error)

Get app by id

func (*Client) NewDeleteAppAppsRequest

func (c *Client) NewDeleteAppAppsRequest(ctx context.Context, path string) (*http.Request, error)

NewDeleteAppAppsRequest create the request corresponding to the deleteApp action endpoint of the apps resource.

func (*Client) NewGetAppsRequest

func (c *Client) NewGetAppsRequest(ctx context.Context, path string) (*http.Request, error)

NewGetAppsRequest create the request corresponding to the get action endpoint of the apps resource.

func (*Client) NewGetMyAppsAppsRequest

func (c *Client) NewGetMyAppsAppsRequest(ctx context.Context, path string) (*http.Request, error)

NewGetMyAppsAppsRequest create the request corresponding to the getMyApps action endpoint of the apps resource.

func (*Client) NewGetUserAppsAppsRequest

func (c *Client) NewGetUserAppsAppsRequest(ctx context.Context, path string) (*http.Request, error)

NewGetUserAppsAppsRequest create the request corresponding to the getUserApps action endpoint of the apps resource.

func (*Client) NewRegenerateClientSecretAppsRequest

func (c *Client) NewRegenerateClientSecretAppsRequest(ctx context.Context, path string) (*http.Request, error)

NewRegenerateClientSecretAppsRequest create the request corresponding to the regenerateClientSecret action endpoint of the apps resource.

func (*Client) NewRegisterAppAppsRequest

func (c *Client) NewRegisterAppAppsRequest(ctx context.Context, path string, payload *AppPayload, contentType string) (*http.Request, error)

NewRegisterAppAppsRequest create the request corresponding to the registerApp action endpoint of the apps resource.

func (*Client) NewUpdateAppAppsRequest

func (c *Client) NewUpdateAppAppsRequest(ctx context.Context, path string, payload *AppPayload, contentType string) (*http.Request, error)

NewUpdateAppAppsRequest create the request corresponding to the updateApp action endpoint of the apps resource.

func (*Client) NewVerifyAppAppsRequest

func (c *Client) NewVerifyAppAppsRequest(ctx context.Context, path string, payload *AppCredentialsPayload, contentType string) (*http.Request, error)

NewVerifyAppAppsRequest create the request corresponding to the verifyApp action endpoint of the apps resource.

func (*Client) RegenerateClientSecretApps

func (c *Client) RegenerateClientSecretApps(ctx context.Context, path string) (*http.Response, error)

Regenerate client secret

func (*Client) RegisterAppApps

func (c *Client) RegisterAppApps(ctx context.Context, path string, payload *AppPayload, contentType string) (*http.Response, error)

Register new app

func (*Client) UpdateAppApps

func (c *Client) UpdateAppApps(ctx context.Context, path string, payload *AppPayload, contentType string) (*http.Response, error)

Register new app

func (*Client) VerifyAppApps

func (c *Client) VerifyAppApps(ctx context.Context, path string, payload *AppCredentialsPayload, contentType string) (*http.Response, error)

Verify an application by its ID and secret

type RegApps

type RegApps struct {
	// App ID
	ID string `form:"id" json:"id" yaml:"id" xml:"id"`
	// Client secret
	Secret string `form:"secret" json:"secret" yaml:"secret" xml:"secret"`
}

reg-apps media type (default view)

Identifier: application/vnd.goa.reg.apps+json; view=default

func (*RegApps) Validate

func (mt *RegApps) Validate() (err error)

Validate validates the RegApps media type instance.

Jump to

Keyboard shortcuts

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