Skip to content

Commit

Permalink
chore(sdk): generate go extend sdk (2024-02-26T19:57:19+00:00)
Browse files Browse the repository at this point in the history
generated from openapi spec commit: 06b8458685cc8bf74b6f2dc57af0e6f157c03ffc
  • Loading branch information
Ubuntu authored and rulisastra committed Feb 27, 2024
1 parent 43cc29f commit 20a820a
Show file tree
Hide file tree
Showing 183 changed files with 18,801 additions and 6,513 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<a name="v0.65.0"></a>
## [v0.65.0]
### chore
- **spec:** add dsartifact service
- **:** generate dsartifact service package
- **samples:** add dsartifact root command cli
### test
- **integration:** add dsartifact integration tests
- **integration:** disable dsartifact integration test
### fix
- **sdk:** mismatch namespace context pointer
### ci
- **github:** update creds
- **github:** use ec2
- **generate:** update common use cases doc
### docs
- **common-use-cases:** update


<a name="v0.64.0"></a>
## [v0.64.0]
### docs
Expand Down
2 changes: 1 addition & 1 deletion basic-sdk/pkg/basicclientmodels/namespace_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type NamespaceCreate struct {
// Required: true
DisplayName *string `json:"displayName"`

// namespace, only accept alphabet and numeric
// namespace, only accept alphabet and numeric. Will be converted to lowercase
// Required: true
Namespace *string `json:"namespace"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Code generated; DO NOT EDIT.

package tags
package admin_tags

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Code generated; DO NOT EDIT.

package tags
package admin_tags

import (
"encoding/json"
Expand All @@ -27,8 +27,8 @@ type AdminDeleteTagHandlerV1Reader struct {
// ReadResponse reads a server response into the received o.
func (o *AdminDeleteTagHandlerV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewAdminDeleteTagHandlerV1Created()
case 204:
result := NewAdminDeleteTagHandlerV1NoContent()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
Expand Down Expand Up @@ -68,23 +68,23 @@ func (o *AdminDeleteTagHandlerV1Reader) ReadResponse(response runtime.ClientResp
}
}

// NewAdminDeleteTagHandlerV1Created creates a AdminDeleteTagHandlerV1Created with default headers values
func NewAdminDeleteTagHandlerV1Created() *AdminDeleteTagHandlerV1Created {
return &AdminDeleteTagHandlerV1Created{}
// NewAdminDeleteTagHandlerV1NoContent creates a AdminDeleteTagHandlerV1NoContent with default headers values
func NewAdminDeleteTagHandlerV1NoContent() *AdminDeleteTagHandlerV1NoContent {
return &AdminDeleteTagHandlerV1NoContent{}
}

/*AdminDeleteTagHandlerV1Created handles this case with default header values.
/*AdminDeleteTagHandlerV1NoContent handles this case with default header values.
Tag deleted
*/
type AdminDeleteTagHandlerV1Created struct {
type AdminDeleteTagHandlerV1NoContent struct {
}

func (o *AdminDeleteTagHandlerV1Created) Error() string {
return fmt.Sprintf("[DELETE /cloudsave/v1/admin/namespaces/{namespace}/tags/{tag}][%d] adminDeleteTagHandlerV1Created ", 201)
func (o *AdminDeleteTagHandlerV1NoContent) Error() string {
return fmt.Sprintf("[DELETE /cloudsave/v1/admin/namespaces/{namespace}/tags/{tag}][%d] adminDeleteTagHandlerV1NoContent ", 204)
}

func (o *AdminDeleteTagHandlerV1Created) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
func (o *AdminDeleteTagHandlerV1NoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// handle file responses
contentDisposition := response.GetHeader("Content-Disposition")
if strings.Contains(strings.ToLower(contentDisposition), "filename=") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Code generated; DO NOT EDIT.

package tags
package admin_tags

import (
"context"
Expand All @@ -16,13 +16,19 @@ import (
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)

// NewAdminListTagsHandlerV1Params creates a new AdminListTagsHandlerV1Params object
// with the default values initialized.
func NewAdminListTagsHandlerV1Params() *AdminListTagsHandlerV1Params {
var ()
var (
limitDefault = int64(25)
offsetDefault = int64(0)
)
return &AdminListTagsHandlerV1Params{
Limit: &limitDefault,
Offset: &offsetDefault,

timeout: cr.DefaultTimeout,
}
Expand All @@ -31,8 +37,13 @@ func NewAdminListTagsHandlerV1Params() *AdminListTagsHandlerV1Params {
// NewAdminListTagsHandlerV1ParamsWithTimeout creates a new AdminListTagsHandlerV1Params object
// with the default values initialized, and the ability to set a timeout on a request
func NewAdminListTagsHandlerV1ParamsWithTimeout(timeout time.Duration) *AdminListTagsHandlerV1Params {
var ()
var (
limitDefault = int64(25)
offsetDefault = int64(0)
)
return &AdminListTagsHandlerV1Params{
Limit: &limitDefault,
Offset: &offsetDefault,

timeout: timeout,
}
Expand All @@ -41,8 +52,13 @@ func NewAdminListTagsHandlerV1ParamsWithTimeout(timeout time.Duration) *AdminLis
// NewAdminListTagsHandlerV1ParamsWithContext creates a new AdminListTagsHandlerV1Params object
// with the default values initialized, and the ability to set a context for a request
func NewAdminListTagsHandlerV1ParamsWithContext(ctx context.Context) *AdminListTagsHandlerV1Params {
var ()
var (
limitDefault = int64(25)
offsetDefault = int64(0)
)
return &AdminListTagsHandlerV1Params{
Limit: &limitDefault,
Offset: &offsetDefault,

Context: ctx,
}
Expand All @@ -51,8 +67,13 @@ func NewAdminListTagsHandlerV1ParamsWithContext(ctx context.Context) *AdminListT
// NewAdminListTagsHandlerV1ParamsWithHTTPClient creates a new AdminListTagsHandlerV1Params object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewAdminListTagsHandlerV1ParamsWithHTTPClient(client *http.Client) *AdminListTagsHandlerV1Params {
var ()
var (
limitDefault = int64(25)
offsetDefault = int64(0)
)
return &AdminListTagsHandlerV1Params{
Limit: &limitDefault,
Offset: &offsetDefault,
HTTPClient: client,
}
}
Expand All @@ -69,6 +90,16 @@ type AdminListTagsHandlerV1Params struct {
*/
Namespace string
/*Limit
the number of data retrieved in a page, default 25
*/
Limit *int64
/*Offset
the number of offset, default 0
*/
Offset *int64

timeout time.Duration
AuthInfoWriter runtime.ClientAuthInfoWriter
Expand Down Expand Up @@ -146,6 +177,28 @@ func (o *AdminListTagsHandlerV1Params) SetNamespace(namespace string) {
o.Namespace = namespace
}

// WithLimit adds the limit to the admin list tags handler v1 params
func (o *AdminListTagsHandlerV1Params) WithLimit(limit *int64) *AdminListTagsHandlerV1Params {
o.SetLimit(limit)
return o
}

// SetLimit adds the limit to the admin list tags handler v1 params
func (o *AdminListTagsHandlerV1Params) SetLimit(limit *int64) {
o.Limit = limit
}

// WithOffset adds the offset to the admin list tags handler v1 params
func (o *AdminListTagsHandlerV1Params) WithOffset(offset *int64) *AdminListTagsHandlerV1Params {
o.SetOffset(offset)
return o
}

// SetOffset adds the offset to the admin list tags handler v1 params
func (o *AdminListTagsHandlerV1Params) SetOffset(offset *int64) {
o.Offset = offset
}

// WriteToRequest writes these params to a swagger request
func (o *AdminListTagsHandlerV1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {

Expand All @@ -159,6 +212,38 @@ func (o *AdminListTagsHandlerV1Params) WriteToRequest(r runtime.ClientRequest, r
return err
}

if o.Limit != nil {

// query param limit
var qrLimit int64
if o.Limit != nil {
qrLimit = *o.Limit
}
qLimit := swag.FormatInt64(qrLimit)
if qLimit != "" {
if err := r.SetQueryParam("limit", qLimit); err != nil {
return err
}
}

}

if o.Offset != nil {

// query param offset
var qrOffset int64
if o.Offset != nil {
qrOffset = *o.Offset
}
qOffset := swag.FormatInt64(qrOffset)
if qOffset != "" {
if err := r.SetQueryParam("offset", qOffset); err != nil {
return err
}
}

}

// setting the default header value
if err := r.SetHeaderParam("User-Agent", utils.UserAgentGen()); err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Code generated; DO NOT EDIT.

package tags
package admin_tags

import (
"encoding/json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Code generated; DO NOT EDIT.

package tags
package admin_tags

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Code generated; DO NOT EDIT.

package tags
package admin_tags

import (
"encoding/json"
Expand Down
Loading

0 comments on commit 20a820a

Please sign in to comment.