Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update generated APIs #1408

Merged
merged 2 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions api/container/v1beta1/container_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -780,26 +780,27 @@ type SecretHashedValue struct {
HashedValue string `json:"hashed_value"`
}

// Token: token
type Token struct {
ID string `json:"id"`

Token string `json:"token"`
// Deprecated
PublicKey *string `json:"public_key,omitempty"`

// Precisely one of ContainerID, NamespaceID must be set.
ContainerID *string `json:"container_id,omitempty"`

// Precisely one of ContainerID, NamespaceID must be set.
NamespaceID *string `json:"namespace_id,omitempty"`

ID string `json:"id"`
// Deprecated
PublicKey *string `json:"public_key,omitempty"`
// Status:
//
// Default value: unknown
Status TokenStatus `json:"status"`

ExpiresAt *time.Time `json:"expires_at"`

Description *string `json:"description"`

ExpiresAt *time.Time `json:"expires_at"`
}

// Service API
Expand Down Expand Up @@ -1979,11 +1980,12 @@ type CreateTokenRequest struct {
// Precisely one of ContainerID, NamespaceID must be set.
NamespaceID *string `json:"namespace_id,omitempty"`

ExpiresAt *time.Time `json:"expires_at"`

Description *string `json:"description"`

ExpiresAt *time.Time `json:"expires_at"`
}

// CreateToken: create a new revocable token
func (s *API) CreateToken(req *CreateTokenRequest, opts ...scw.RequestOption) (*Token, error) {
var err error

Expand Down Expand Up @@ -2025,6 +2027,7 @@ type GetTokenRequest struct {
TokenID string `json:"-"`
}

// GetToken: get a token
func (s *API) GetToken(req *GetTokenRequest, opts ...scw.RequestOption) (*Token, error) {
var err error

Expand Down Expand Up @@ -2075,6 +2078,7 @@ type ListTokensRequest struct {
NamespaceID *string `json:"-"`
}

// ListTokens: list all tokens
func (s *API) ListTokens(req *ListTokensRequest, opts ...scw.RequestOption) (*ListTokensResponse, error) {
var err error

Expand Down Expand Up @@ -2124,6 +2128,7 @@ type DeleteTokenRequest struct {
TokenID string `json:"-"`
}

// DeleteToken: delete a token
func (s *API) DeleteToken(req *DeleteTokenRequest, opts ...scw.RequestOption) (*Token, error) {
var err error

Expand Down
21 changes: 13 additions & 8 deletions api/function/v1beta1/function_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -881,26 +881,27 @@ type SecretHashedValue struct {
HashedValue string `json:"hashed_value"`
}

// Token: token
type Token struct {
ID string `json:"id"`

Token string `json:"token"`
// Deprecated
PublicKey *string `json:"public_key,omitempty"`

// Precisely one of FunctionID, NamespaceID must be set.
FunctionID *string `json:"function_id,omitempty"`

// Precisely one of FunctionID, NamespaceID must be set.
NamespaceID *string `json:"namespace_id,omitempty"`

ID string `json:"id"`
// Deprecated
PublicKey *string `json:"public_key,omitempty"`
// Status:
//
// Default value: unknown
Status TokenStatus `json:"status"`

ExpiresAt *time.Time `json:"expires_at"`

Description *string `json:"description"`

ExpiresAt *time.Time `json:"expires_at"`
}

// UploadURL: upload url
Expand Down Expand Up @@ -2208,11 +2209,12 @@ type CreateTokenRequest struct {
// Precisely one of FunctionID, NamespaceID must be set.
NamespaceID *string `json:"namespace_id,omitempty"`

ExpiresAt *time.Time `json:"expires_at"`

Description *string `json:"description"`

ExpiresAt *time.Time `json:"expires_at"`
}

// CreateToken: create a new revocable token
func (s *API) CreateToken(req *CreateTokenRequest, opts ...scw.RequestOption) (*Token, error) {
var err error

Expand Down Expand Up @@ -2254,6 +2256,7 @@ type GetTokenRequest struct {
TokenID string `json:"-"`
}

// GetToken: get a token
func (s *API) GetToken(req *GetTokenRequest, opts ...scw.RequestOption) (*Token, error) {
var err error

Expand Down Expand Up @@ -2304,6 +2307,7 @@ type ListTokensRequest struct {
NamespaceID *string `json:"-"`
}

// ListTokens: list all tokens
func (s *API) ListTokens(req *ListTokensRequest, opts ...scw.RequestOption) (*ListTokensResponse, error) {
var err error

Expand Down Expand Up @@ -2353,6 +2357,7 @@ type DeleteTokenRequest struct {
TokenID string `json:"-"`
}

// DeleteToken: delete a token
func (s *API) DeleteToken(req *DeleteTokenRequest, opts ...scw.RequestOption) (*Token, error) {
var err error

Expand Down