tiup

package
v0.0.0-...-69b4764 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const APIName = "publisher"

APIName is the name of the API as defined in the design.

View Source
const APIVersion = "1.0.0"

APIVersion is the version of the API as defined in the design.

View Source
const ServiceName = "tiup"

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 = [3]string{"request-to-publish", "query-publishing-status", "reset-rate-limit"}

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 NewQueryPublishingStatusEndpoint

func NewQueryPublishingStatusEndpoint(s Service) goa.Endpoint

NewQueryPublishingStatusEndpoint returns an endpoint function that calls the method "query-publishing-status" of service "tiup".

func NewRequestToPublishEndpoint

func NewRequestToPublishEndpoint(s Service) goa.Endpoint

NewRequestToPublishEndpoint returns an endpoint function that calls the method "request-to-publish" of service "tiup".

func NewResetRateLimitEndpoint

func NewResetRateLimitEndpoint(s Service) goa.Endpoint

NewResetRateLimitEndpoint returns an endpoint function that calls the method "reset-rate-limit" of service "tiup".

Types

type Client

type Client struct {
	RequestToPublishEndpoint      goa.Endpoint
	QueryPublishingStatusEndpoint goa.Endpoint
	ResetRateLimitEndpoint        goa.Endpoint
}

Client is the "tiup" service client.

func NewClient

func NewClient(requestToPublish, queryPublishingStatus, resetRateLimit goa.Endpoint) *Client

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

func (*Client) QueryPublishingStatus

func (c *Client) QueryPublishingStatus(ctx context.Context, p *QueryPublishingStatusPayload) (res string, err error)

QueryPublishingStatus calls the "query-publishing-status" endpoint of the "tiup" service.

func (*Client) RequestToPublish

func (c *Client) RequestToPublish(ctx context.Context, p *RequestToPublishPayload) (res []string, err error)

RequestToPublish calls the "request-to-publish" endpoint of the "tiup" service.

func (*Client) ResetRateLimit

func (c *Client) ResetRateLimit(ctx context.Context) (err error)

ResetRateLimit calls the "reset-rate-limit" endpoint of the "tiup" service.

type Endpoints

type Endpoints struct {
	RequestToPublish      goa.Endpoint
	QueryPublishingStatus goa.Endpoint
	ResetRateLimit        goa.Endpoint
}

Endpoints wraps the "tiup" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

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

func (*Endpoints) Use

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

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

type QueryPublishingStatusPayload

type QueryPublishingStatusPayload struct {
	// request track id
	RequestID string
}

QueryPublishingStatusPayload is the payload type of the tiup service query-publishing-status method.

type RequestToPublishPayload

type RequestToPublishPayload struct {
	// The full url of the pushed OCI artifact, contain the tag part. It will parse
	// the repo from it.
	ArtifactURL string
	// Force set the version. Default is the artifact version read from
	// `org.opencontainers.image.version` of the manifest config.
	Version *string
	// Staging is http://tiup.pingcap.net:8988, product is
	// http://tiup.pingcap.net:8987.
	TiupMirror string
	// The request id
	RequestID *string
}

RequestToPublishPayload is the payload type of the tiup service request-to-publish method.

type Service

type Service interface {
	// RequestToPublish implements request-to-publish.
	RequestToPublish(context.Context, *RequestToPublishPayload) (res []string, err error)
	// QueryPublishingStatus implements query-publishing-status.
	QueryPublishingStatus(context.Context, *QueryPublishingStatusPayload) (res string, err error)
	// ResetRateLimit implements reset-rate-limit.
	ResetRateLimit(context.Context) (err error)
}

TiUP Publisher service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳