github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/client/oidc/oidc_client.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package oidc 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "context" 10 11 "github.com/go-openapi/runtime" 12 13 strfmt "github.com/go-openapi/strfmt" 14 ) 15 16 //go:generate mockery -name API -inpkg 17 18 // API is the interface of the oidc client 19 type API interface { 20 /* 21 PingOIDC tests the OIDC endpoint 22 23 Test the OIDC endpoint, the setting of the endpoint is provided in the request. This API can only be called by system admin. 24 */ 25 PingOIDC(ctx context.Context, params *PingOIDCParams) (*PingOIDCOK, error) 26 } 27 28 // New creates a new oidc API client. 29 func New(transport runtime.ClientTransport, formats strfmt.Registry, authInfo runtime.ClientAuthInfoWriter) *Client { 30 return &Client{ 31 transport: transport, 32 formats: formats, 33 authInfo: authInfo, 34 } 35 } 36 37 /* 38 Client for oidc API 39 */ 40 type Client struct { 41 transport runtime.ClientTransport 42 formats strfmt.Registry 43 authInfo runtime.ClientAuthInfoWriter 44 } 45 46 /* 47 PingOIDC tests the OIDC endpoint 48 49 Test the OIDC endpoint, the setting of the endpoint is provided in the request. This API can only be called by system admin. 50 */ 51 func (a *Client) PingOIDC(ctx context.Context, params *PingOIDCParams) (*PingOIDCOK, error) { 52 53 result, err := a.transport.Submit(&runtime.ClientOperation{ 54 ID: "pingOIDC", 55 Method: "POST", 56 PathPattern: "/system/oidc/ping", 57 ProducesMediaTypes: []string{"application/json"}, 58 ConsumesMediaTypes: []string{"application/json"}, 59 Schemes: []string{"http", "https"}, 60 Params: params, 61 Reader: &PingOIDCReader{formats: a.formats}, 62 AuthInfo: a.authInfo, 63 Context: ctx, 64 Client: params.HTTPClient, 65 }) 66 if err != nil { 67 return nil, err 68 } 69 return result.(*PingOIDCOK), nil 70 71 }