Skip to content

Commit

Permalink
fix(serverless): remove usage of domain_name in create and update (#1339
Browse files Browse the repository at this point in the history
)

Co-authored-by: Rémy Léone <rleone@scaleway.com>
  • Loading branch information
scaleway-bot and remyleone authored Jul 6, 2022
1 parent 6041f36 commit 00c3c36
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/container/v1beta1/container_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1202,8 +1202,6 @@ type CreateContainerRequest struct {
RegistryImage *string `json:"registry_image"`

MaxConcurrency *uint32 `json:"max_concurrency"`

DomainName *string `json:"domain_name"`
// Protocol:
//
// Default value: unknown_protocol
Expand Down Expand Up @@ -1287,8 +1285,6 @@ type UpdateContainerRequest struct {
RegistryImage *string `json:"registry_image"`

MaxConcurrency *uint32 `json:"max_concurrency"`

DomainName *string `json:"domain_name"`
// Protocol:
//
// Default value: unknown_protocol
Expand Down Expand Up @@ -1756,6 +1752,7 @@ type ListDomainsRequest struct {
ContainerID string `json:"-"`
}

// ListDomains: list all domain name bindings
func (s *API) ListDomains(req *ListDomainsRequest, opts ...scw.RequestOption) (*ListDomainsResponse, error) {
var err error

Expand Down Expand Up @@ -1804,6 +1801,7 @@ type GetDomainRequest struct {
DomainID string `json:"-"`
}

// GetDomain: get a domain name binding
func (s *API) GetDomain(req *GetDomainRequest, opts ...scw.RequestOption) (*Domain, error) {
var err error

Expand Down Expand Up @@ -1846,6 +1844,7 @@ type CreateDomainRequest struct {
ContainerID string `json:"container_id"`
}

// CreateDomain: create a domain name binding
func (s *API) CreateDomain(req *CreateDomainRequest, opts ...scw.RequestOption) (*Domain, error) {
var err error

Expand Down Expand Up @@ -1887,6 +1886,7 @@ type DeleteDomainRequest struct {
DomainID string `json:"-"`
}

// DeleteDomain: delete a domain name binding
func (s *API) DeleteDomain(req *DeleteDomainRequest, opts ...scw.RequestOption) (*Domain, error) {
var err error

Expand Down
6 changes: 6 additions & 0 deletions api/function/v1beta1/function_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,8 @@ type Function struct {

Description *string `json:"description"`

DomainName string `json:"domain_name"`

SecretEnvironmentVariables []*SecretHashedValue `json:"secret_environment_variables"`

Region scw.Region `json:"region"`
Expand Down Expand Up @@ -1975,6 +1977,7 @@ type ListDomainsRequest struct {
FunctionID string `json:"-"`
}

// ListDomains: list all domain name bindings
func (s *API) ListDomains(req *ListDomainsRequest, opts ...scw.RequestOption) (*ListDomainsResponse, error) {
var err error

Expand Down Expand Up @@ -2023,6 +2026,7 @@ type GetDomainRequest struct {
DomainID string `json:"-"`
}

// GetDomain: get a domain name binding
func (s *API) GetDomain(req *GetDomainRequest, opts ...scw.RequestOption) (*Domain, error) {
var err error

Expand Down Expand Up @@ -2065,6 +2069,7 @@ type CreateDomainRequest struct {
FunctionID string `json:"function_id"`
}

// CreateDomain: create a domain name binding
func (s *API) CreateDomain(req *CreateDomainRequest, opts ...scw.RequestOption) (*Domain, error) {
var err error

Expand Down Expand Up @@ -2106,6 +2111,7 @@ type DeleteDomainRequest struct {
DomainID string `json:"-"`
}

// DeleteDomain: delete a domain name binding
func (s *API) DeleteDomain(req *DeleteDomainRequest, opts ...scw.RequestOption) (*Domain, error) {
var err error

Expand Down

0 comments on commit 00c3c36

Please sign in to comment.