Documentation
¶
Index ¶
Constants ¶
const APIName = "publisher"
APIName is the name of the API as defined in the design.
const APIVersion = "1.0.0"
APIVersion is the version of the API as defined in the design.
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 ¶
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 ¶
NewQueryPublishingStatusEndpoint returns an endpoint function that calls the method "query-publishing-status" of service "tiup".
func NewRequestToPublishEndpoint ¶
NewRequestToPublishEndpoint returns an endpoint function that calls the method "request-to-publish" of service "tiup".
func NewResetRateLimitEndpoint ¶
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 (*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.
type Endpoints ¶
type Endpoints struct { RequestToPublish goa.Endpoint QueryPublishingStatus goa.Endpoint ResetRateLimit goa.Endpoint }
Endpoints wraps the "tiup" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "tiup" service with 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