Documentation
¶
Overview ¶
Package webhosting provides methods and message types of the webhosting v1 API.
Index ¶
- Constants
- type CheckUserOwnsDomainResponse
- type ControlPanel
- type ControlPanelAPI
- type ControlPanelAPIListControlPanelsRequest
- type CreateDatabaseRequestUser
- type CreateHostingRequestDomainConfiguration
- type DNSAPICheckUserOwnsDomainRequest
- type DNSAPIGetDomainDNSRecordsRequest
- type DNSAPISyncDomainDNSRecordsRequest
- type DNSRecord
- type DNSRecordStatus
- type DNSRecordType
- type DNSRecords
- type DNSRecordsStatus
- type Database
- type DatabaseAPI
- func (s *DatabaseAPI) AssignDatabaseUser(req *DatabaseAPIAssignDatabaseUserRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
- func (s *DatabaseAPI) ChangeDatabaseUserPassword(req *DatabaseAPIChangeDatabaseUserPasswordRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
- func (s *DatabaseAPI) CreateDatabase(req *DatabaseAPICreateDatabaseRequest, opts ...scw.RequestOption) (*Database, error)
- func (s *DatabaseAPI) CreateDatabaseUser(req *DatabaseAPICreateDatabaseUserRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
- func (s *DatabaseAPI) DeleteDatabase(req *DatabaseAPIDeleteDatabaseRequest, opts ...scw.RequestOption) (*Database, error)
- func (s *DatabaseAPI) DeleteDatabaseUser(req *DatabaseAPIDeleteDatabaseUserRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
- func (s *DatabaseAPI) GetDatabase(req *DatabaseAPIGetDatabaseRequest, opts ...scw.RequestOption) (*Database, error)
- func (s *DatabaseAPI) GetDatabaseUser(req *DatabaseAPIGetDatabaseUserRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
- func (s *DatabaseAPI) ListDatabaseUsers(req *DatabaseAPIListDatabaseUsersRequest, opts ...scw.RequestOption) (*ListDatabaseUsersResponse, error)
- func (s *DatabaseAPI) ListDatabases(req *DatabaseAPIListDatabasesRequest, opts ...scw.RequestOption) (*ListDatabasesResponse, error)
- func (s *DatabaseAPI) Regions() []scw.Region
- func (s *DatabaseAPI) UnassignDatabaseUser(req *DatabaseAPIUnassignDatabaseUserRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
- type DatabaseAPIAssignDatabaseUserRequest
- type DatabaseAPIChangeDatabaseUserPasswordRequest
- type DatabaseAPICreateDatabaseRequest
- type DatabaseAPICreateDatabaseUserRequest
- type DatabaseAPIDeleteDatabaseRequest
- type DatabaseAPIDeleteDatabaseUserRequest
- type DatabaseAPIGetDatabaseRequest
- type DatabaseAPIGetDatabaseUserRequest
- type DatabaseAPIListDatabaseUsersRequest
- type DatabaseAPIListDatabasesRequest
- type DatabaseAPIUnassignDatabaseUserRequest
- type DatabaseUser
- type DnsAPI
- func (s *DnsAPI) CheckUserOwnsDomain(req *DNSAPICheckUserOwnsDomainRequest, opts ...scw.RequestOption) (*CheckUserOwnsDomainResponse, error)
- func (s *DnsAPI) GetDomainDNSRecords(req *DNSAPIGetDomainDNSRecordsRequest, opts ...scw.RequestOption) (*DNSRecords, error)
- func (s *DnsAPI) Regions() []scw.Region
- func (s *DnsAPI) SyncDomainDNSRecords(req *DNSAPISyncDomainDNSRecordsRequest, opts ...scw.RequestOption) (*DNSRecords, error)
- type FtpAccount
- type FtpAccountAPI
- func (s *FtpAccountAPI) ChangeFtpAccountPassword(req *FtpAccountAPIChangeFtpAccountPasswordRequest, opts ...scw.RequestOption) (*FtpAccount, error)
- func (s *FtpAccountAPI) CreateFtpAccount(req *FtpAccountAPICreateFtpAccountRequest, opts ...scw.RequestOption) (*FtpAccount, error)
- func (s *FtpAccountAPI) ListFtpAccounts(req *FtpAccountAPIListFtpAccountsRequest, opts ...scw.RequestOption) (*ListFtpAccountsResponse, error)
- func (s *FtpAccountAPI) Regions() []scw.Region
- func (s *FtpAccountAPI) RemoveFtpAccount(req *FtpAccountAPIRemoveFtpAccountRequest, opts ...scw.RequestOption) (*FtpAccount, error)
- type FtpAccountAPIChangeFtpAccountPasswordRequest
- type FtpAccountAPICreateFtpAccountRequest
- type FtpAccountAPIListFtpAccountsRequest
- type FtpAccountAPIRemoveFtpAccountRequest
- type Hosting
- type HostingAPI
- func (s *HostingAPI) CreateHosting(req *HostingAPICreateHostingRequest, opts ...scw.RequestOption) (*Hosting, error)
- func (s *HostingAPI) CreateSession(req *HostingAPICreateSessionRequest, opts ...scw.RequestOption) (*Session, error)
- func (s *HostingAPI) DeleteHosting(req *HostingAPIDeleteHostingRequest, opts ...scw.RequestOption) (*Hosting, error)
- func (s *HostingAPI) GetHosting(req *HostingAPIGetHostingRequest, opts ...scw.RequestOption) (*Hosting, error)
- func (s *HostingAPI) GetResourceSummary(req *HostingAPIGetResourceSummaryRequest, opts ...scw.RequestOption) (*ResourceSummary, error)
- func (s *HostingAPI) ListHostings(req *HostingAPIListHostingsRequest, opts ...scw.RequestOption) (*ListHostingsResponse, error)
- func (s *HostingAPI) Regions() []scw.Region
- func (s *HostingAPI) ResetHostingPassword(req *HostingAPIResetHostingPasswordRequest, opts ...scw.RequestOption) (*ResetHostingPasswordResponse, error)
- func (s *HostingAPI) UpdateHosting(req *HostingAPIUpdateHostingRequest, opts ...scw.RequestOption) (*Hosting, error)
- type HostingAPICreateHostingRequest
- type HostingAPICreateSessionRequest
- type HostingAPIDeleteHostingRequest
- type HostingAPIGetHostingRequest
- type HostingAPIGetResourceSummaryRequest
- type HostingAPIListHostingsRequest
- type HostingAPIResetHostingPasswordRequest
- type HostingAPIUpdateHostingRequest
- type HostingStatus
- type HostingSummary
- type HostingSummaryStatus
- type HostingUser
- type ListControlPanelsResponse
- type ListDatabaseUsersRequestOrderBy
- type ListDatabaseUsersResponse
- type ListDatabasesRequestOrderBy
- type ListDatabasesResponse
- type ListFtpAccountsRequestOrderBy
- type ListFtpAccountsResponse
- type ListHostingsRequestOrderBy
- type ListHostingsResponse
- type ListMailAccountsRequestOrderBy
- type ListMailAccountsResponse
- type ListOffersRequestOrderBy
- type ListOffersResponse
- type ListWebsitesRequestOrderBy
- type ListWebsitesResponse
- type MailAccount
- type MailAccountAPI
- func (s *MailAccountAPI) ChangeMailAccountPassword(req *MailAccountAPIChangeMailAccountPasswordRequest, opts ...scw.RequestOption) (*MailAccount, error)
- func (s *MailAccountAPI) CreateMailAccount(req *MailAccountAPICreateMailAccountRequest, opts ...scw.RequestOption) (*MailAccount, error)
- func (s *MailAccountAPI) ListMailAccounts(req *MailAccountAPIListMailAccountsRequest, opts ...scw.RequestOption) (*ListMailAccountsResponse, error)
- func (s *MailAccountAPI) Regions() []scw.Region
- func (s *MailAccountAPI) RemoveMailAccount(req *MailAccountAPIRemoveMailAccountRequest, opts ...scw.RequestOption) (*MailAccount, error)
- type MailAccountAPIChangeMailAccountPasswordRequest
- type MailAccountAPICreateMailAccountRequest
- type MailAccountAPIListMailAccountsRequest
- type MailAccountAPIRemoveMailAccountRequest
- type Nameserver
- type NameserverStatus
- type Offer
- type OfferAPI
- type OfferAPIListOffersRequest
- type OfferOption
- type OfferOptionName
- type OfferOptionRequest
- type OfferOptionWarning
- type Platform
- type PlatformControlPanel
- type PlatformControlPanelURLs
- type PlatformPlatformGroup
- type ResetHostingPasswordResponse
- type ResourceSummary
- type Session
- type SyncDomainDNSRecordsRequestRecord
- type Website
- type WebsiteAPI
- type WebsiteAPIListWebsitesRequest
Constants ¶
const ( DNSRecordStatusUnknownStatus = DNSRecordStatus("unknown_status") DNSRecordStatusValid = DNSRecordStatus("valid") DNSRecordStatusInvalid = DNSRecordStatus("invalid") )
const ( DNSRecordTypeUnknownType = DNSRecordType("unknown_type") DNSRecordTypeA = DNSRecordType("a") DNSRecordTypeCname = DNSRecordType("cname") DNSRecordTypeMx = DNSRecordType("mx") DNSRecordTypeTxt = DNSRecordType("txt") DNSRecordTypeNs = DNSRecordType("ns") DNSRecordTypeAaaa = DNSRecordType("aaaa") )
const ( DNSRecordsStatusUnknownStatus = DNSRecordsStatus("unknown_status") DNSRecordsStatusValid = DNSRecordsStatus("valid") DNSRecordsStatusInvalid = DNSRecordsStatus("invalid") )
const ( HostingStatusUnknownStatus = HostingStatus("unknown_status") HostingStatusDelivering = HostingStatus("delivering") HostingStatusReady = HostingStatus("ready") HostingStatusDeleting = HostingStatus("deleting") HostingStatusError = HostingStatus("error") HostingStatusLocked = HostingStatus("locked") HostingStatusMigrating = HostingStatus("migrating") )
const ( HostingSummaryStatusUnknownStatus = HostingSummaryStatus("unknown_status") HostingSummaryStatusDelivering = HostingSummaryStatus("delivering") HostingSummaryStatusReady = HostingSummaryStatus("ready") HostingSummaryStatusDeleting = HostingSummaryStatus("deleting") HostingSummaryStatusError = HostingSummaryStatus("error") HostingSummaryStatusLocked = HostingSummaryStatus("locked") HostingSummaryStatusMigrating = HostingSummaryStatus("migrating") )
const ( ListDatabaseUsersRequestOrderByUsernameAsc = ListDatabaseUsersRequestOrderBy("username_asc") ListDatabaseUsersRequestOrderByUsernameDesc = ListDatabaseUsersRequestOrderBy("username_desc") )
const ( ListDatabasesRequestOrderByDatabaseNameAsc = ListDatabasesRequestOrderBy("database_name_asc") ListDatabasesRequestOrderByDatabaseNameDesc = ListDatabasesRequestOrderBy("database_name_desc") )
const ( ListFtpAccountsRequestOrderByUsernameAsc = ListFtpAccountsRequestOrderBy("username_asc") ListFtpAccountsRequestOrderByUsernameDesc = ListFtpAccountsRequestOrderBy("username_desc") )
const ( ListHostingsRequestOrderByCreatedAtAsc = ListHostingsRequestOrderBy("created_at_asc") ListHostingsRequestOrderByCreatedAtDesc = ListHostingsRequestOrderBy("created_at_desc") )
const ( ListMailAccountsRequestOrderByUsernameAsc = ListMailAccountsRequestOrderBy("username_asc") ListMailAccountsRequestOrderByUsernameDesc = ListMailAccountsRequestOrderBy("username_desc") ListMailAccountsRequestOrderByDomainAsc = ListMailAccountsRequestOrderBy("domain_asc") ListMailAccountsRequestOrderByDomainDesc = ListMailAccountsRequestOrderBy("domain_desc") )
const ( ListWebsitesRequestOrderByDomainAsc = ListWebsitesRequestOrderBy("domain_asc") ListWebsitesRequestOrderByDomainDesc = ListWebsitesRequestOrderBy("domain_desc") )
const ( NameserverStatusUnknownStatus = NameserverStatus("unknown_status") NameserverStatusValid = NameserverStatus("valid") NameserverStatusInvalid = NameserverStatus("invalid") )
const ( OfferOptionNameUnknownName = OfferOptionName("unknown_name") OfferOptionNameDomainCount = OfferOptionName("domain_count") OfferOptionNameEmailCount = OfferOptionName("email_count") OfferOptionNameStorageGb = OfferOptionName("storage_gb") OfferOptionNameVcpuCount = OfferOptionName("vcpu_count") OfferOptionNameRAMGb = OfferOptionName("ram_gb") OfferOptionNameBackup = OfferOptionName("backup") OfferOptionNameDedicatedIP = OfferOptionName("dedicated_ip") OfferOptionNameEmailStorageGb = OfferOptionName("email_storage_gb") OfferOptionNameDatabaseCount = OfferOptionName("database_count") OfferOptionNameSupport = OfferOptionName("support") )
const ( OfferOptionWarningUnknownWarning = OfferOptionWarning("unknown_warning") OfferOptionWarningQuotaExceededWarning = OfferOptionWarning("quota_exceeded_warning") OfferOptionWarningUsageLowWarning = OfferOptionWarning("usage_low_warning") )
const ( PlatformPlatformGroupUnknownGroup = PlatformPlatformGroup("unknown_group") PlatformPlatformGroupDefault = PlatformPlatformGroup("default") PlatformPlatformGroupPremium = PlatformPlatformGroup("premium") )
const (
ListOffersRequestOrderByPriceAsc = ListOffersRequestOrderBy("price_asc")
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckUserOwnsDomainResponse ¶
type CheckUserOwnsDomainResponse struct {
// OwnsDomain: indicates whether the specified project owns the domain.
OwnsDomain bool `json:"owns_domain"`
}
CheckUserOwnsDomainResponse: check user owns domain response.
type ControlPanel ¶
type ControlPanel struct {
// Name: control panel name.
Name string `json:"name"`
// Available: define if the control panel type is available to order.
Available bool `json:"available"`
// LogoURL: URL of the control panel's logo.
LogoURL string `json:"logo_url"`
// AvailableLanguages: list of available languages for the control panel.
AvailableLanguages []std.LanguageCode `json:"available_languages"`
}
ControlPanel: control panel.
type ControlPanelAPI ¶
type ControlPanelAPI struct {
// contains filtered or unexported fields
}
This API allows you to manage your Web Hosting services.
func NewControlPanelAPI ¶
func NewControlPanelAPI(client *scw.Client) *ControlPanelAPI
NewControlPanelAPI returns a ControlPanelAPI object from a Scaleway client.
func (*ControlPanelAPI) ListControlPanels ¶
func (s *ControlPanelAPI) ListControlPanels(req *ControlPanelAPIListControlPanelsRequest, opts ...scw.RequestOption) (*ListControlPanelsResponse, error)
ListControlPanels: "List the control panels type: cpanel or plesk.".
func (*ControlPanelAPI) Regions ¶
func (s *ControlPanelAPI) Regions() []scw.Region
type ControlPanelAPIListControlPanelsRequest ¶
type ControlPanelAPIListControlPanelsRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Page: page number (must be a positive integer).
Page *int32 `json:"-"`
// PageSize: number of control panels to return (must be a positive integer lower or equal to 100).
PageSize *uint32 `json:"-"`
}
ControlPanelAPIListControlPanelsRequest: control panel api list control panels request.
type CreateDatabaseRequestUser ¶
type CreateDatabaseRequestUser struct {
Username string `json:"username"`
Password string `json:"password"`
}
CreateDatabaseRequestUser: create database request user.
type CreateHostingRequestDomainConfiguration ¶
type CreateHostingRequestDomainConfiguration struct {
UpdateNameservers bool `json:"update_nameservers"`
UpdateWebRecord bool `json:"update_web_record"`
UpdateMailRecord bool `json:"update_mail_record"`
UpdateAllRecords bool `json:"update_all_records"`
}
CreateHostingRequestDomainConfiguration: create hosting request domain configuration.
type DNSAPICheckUserOwnsDomainRequest ¶
type DNSAPICheckUserOwnsDomainRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Domain: domain for which ownership is to be verified.
Domain string `json:"-"`
// ProjectID: ID of the project currently in use.
ProjectID string `json:"project_id"`
}
DNSAPICheckUserOwnsDomainRequest: dnsapi check user owns domain request.
type DNSAPIGetDomainDNSRecordsRequest ¶
type DNSAPIGetDomainDNSRecordsRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Domain: domain associated with the DNS records.
Domain string `json:"-"`
}
DNSAPIGetDomainDNSRecordsRequest: dnsapi get domain dns records request.
type DNSAPISyncDomainDNSRecordsRequest ¶
type DNSAPISyncDomainDNSRecordsRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Domain: domain for which the DNS records will be synchronized.
Domain string `json:"-"`
// UpdateWebRecords: whether or not to synchronize the web records.
UpdateWebRecords bool `json:"update_web_records"`
// UpdateMailRecords: whether or not to synchronize the mail records.
UpdateMailRecords bool `json:"update_mail_records"`
// UpdateAllRecords: whether or not to synchronize all types of records. This one has priority.
UpdateAllRecords bool `json:"update_all_records"`
// CustomRecords: custom records to synchronize.
CustomRecords []*SyncDomainDNSRecordsRequestRecord `json:"custom_records"`
}
DNSAPISyncDomainDNSRecordsRequest: dnsapi sync domain dns records request.
type DNSRecord ¶
type DNSRecord struct {
// Name: record name.
Name string `json:"name"`
// Type: record type.
// Default value: unknown_type
Type DNSRecordType `json:"type"`
// TTL: record time-to-live.
TTL uint32 `json:"ttl"`
// Value: record value.
Value string `json:"value"`
// Priority: record priority level.
Priority *uint32 `json:"priority"`
// Status: record status.
// Default value: unknown_status
Status DNSRecordStatus `json:"status"`
}
DNSRecord: dns record.
type DNSRecordStatus ¶
type DNSRecordStatus string
func (DNSRecordStatus) MarshalJSON ¶
func (enum DNSRecordStatus) MarshalJSON() ([]byte, error)
func (DNSRecordStatus) String ¶
func (enum DNSRecordStatus) String() string
func (*DNSRecordStatus) UnmarshalJSON ¶
func (enum *DNSRecordStatus) UnmarshalJSON(data []byte) error
func (DNSRecordStatus) Values ¶
func (enum DNSRecordStatus) Values() []DNSRecordStatus
type DNSRecordType ¶
type DNSRecordType string
func (DNSRecordType) MarshalJSON ¶
func (enum DNSRecordType) MarshalJSON() ([]byte, error)
func (DNSRecordType) String ¶
func (enum DNSRecordType) String() string
func (*DNSRecordType) UnmarshalJSON ¶
func (enum *DNSRecordType) UnmarshalJSON(data []byte) error
func (DNSRecordType) Values ¶
func (enum DNSRecordType) Values() []DNSRecordType
type DNSRecords ¶
type DNSRecords struct {
// Records: list of DNS records.
Records []*DNSRecord `json:"records"`
// NameServers: list of nameservers.
NameServers []*Nameserver `json:"name_servers"`
// Status: status of the records.
// Default value: unknown_status
Status DNSRecordsStatus `json:"status"`
}
DNSRecords: dns records.
type DNSRecordsStatus ¶
type DNSRecordsStatus string
func (DNSRecordsStatus) MarshalJSON ¶
func (enum DNSRecordsStatus) MarshalJSON() ([]byte, error)
func (DNSRecordsStatus) String ¶
func (enum DNSRecordsStatus) String() string
func (*DNSRecordsStatus) UnmarshalJSON ¶
func (enum *DNSRecordsStatus) UnmarshalJSON(data []byte) error
func (DNSRecordsStatus) Values ¶
func (enum DNSRecordsStatus) Values() []DNSRecordsStatus
type Database ¶
type Database struct {
// DatabaseName: name of the database.
DatabaseName string `json:"database_name"`
// Users: list of users who have access to the database.
Users []string `json:"users"`
}
Database: database.
type DatabaseAPI ¶
type DatabaseAPI struct {
// contains filtered or unexported fields
}
This API allows you to manage your databases and database users for your Web Hosting services.
func NewDatabaseAPI ¶
func NewDatabaseAPI(client *scw.Client) *DatabaseAPI
NewDatabaseAPI returns a DatabaseAPI object from a Scaleway client.
func (*DatabaseAPI) AssignDatabaseUser ¶
func (s *DatabaseAPI) AssignDatabaseUser(req *DatabaseAPIAssignDatabaseUserRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
AssignDatabaseUser: "Assign a database user to a database".
func (*DatabaseAPI) ChangeDatabaseUserPassword ¶
func (s *DatabaseAPI) ChangeDatabaseUserPassword(req *DatabaseAPIChangeDatabaseUserPasswordRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
ChangeDatabaseUserPassword: "Change the password of a database user".
func (*DatabaseAPI) CreateDatabase ¶
func (s *DatabaseAPI) CreateDatabase(req *DatabaseAPICreateDatabaseRequest, opts ...scw.RequestOption) (*Database, error)
CreateDatabase: "Create a new database within your hosting plan".
func (*DatabaseAPI) CreateDatabaseUser ¶
func (s *DatabaseAPI) CreateDatabaseUser(req *DatabaseAPICreateDatabaseUserRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
CreateDatabaseUser: "Create a new database user".
func (*DatabaseAPI) DeleteDatabase ¶
func (s *DatabaseAPI) DeleteDatabase(req *DatabaseAPIDeleteDatabaseRequest, opts ...scw.RequestOption) (*Database, error)
DeleteDatabase: "Delete a database within your hosting plan".
func (*DatabaseAPI) DeleteDatabaseUser ¶
func (s *DatabaseAPI) DeleteDatabaseUser(req *DatabaseAPIDeleteDatabaseUserRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
DeleteDatabaseUser: "Delete a database user".
func (*DatabaseAPI) GetDatabase ¶
func (s *DatabaseAPI) GetDatabase(req *DatabaseAPIGetDatabaseRequest, opts ...scw.RequestOption) (*Database, error)
GetDatabase: "Get details of a database within your hosting plan".
func (*DatabaseAPI) GetDatabaseUser ¶
func (s *DatabaseAPI) GetDatabaseUser(req *DatabaseAPIGetDatabaseUserRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
GetDatabaseUser: "Get details of a database user".
func (*DatabaseAPI) ListDatabaseUsers ¶
func (s *DatabaseAPI) ListDatabaseUsers(req *DatabaseAPIListDatabaseUsersRequest, opts ...scw.RequestOption) (*ListDatabaseUsersResponse, error)
ListDatabaseUsers: "List all database users".
func (*DatabaseAPI) ListDatabases ¶
func (s *DatabaseAPI) ListDatabases(req *DatabaseAPIListDatabasesRequest, opts ...scw.RequestOption) (*ListDatabasesResponse, error)
ListDatabases: "List all databases within your hosting plan".
func (*DatabaseAPI) Regions ¶
func (s *DatabaseAPI) Regions() []scw.Region
func (*DatabaseAPI) UnassignDatabaseUser ¶
func (s *DatabaseAPI) UnassignDatabaseUser(req *DatabaseAPIUnassignDatabaseUserRequest, opts ...scw.RequestOption) (*DatabaseUser, error)
UnassignDatabaseUser: "Unassign a database user from a database".
type DatabaseAPIAssignDatabaseUserRequest ¶
type DatabaseAPIAssignDatabaseUserRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// DatabaseName: name of the database to be assigned.
DatabaseName string `json:"-"`
// Username: name of the user to assign.
Username string `json:"username"`
}
DatabaseAPIAssignDatabaseUserRequest: database api assign database user request.
type DatabaseAPIChangeDatabaseUserPasswordRequest ¶
type DatabaseAPIChangeDatabaseUserPasswordRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Username: name of the user to update.
Username string `json:"-"`
// Password: new password.
Password string `json:"password"`
}
DatabaseAPIChangeDatabaseUserPasswordRequest: database api change database user password request.
type DatabaseAPICreateDatabaseRequest ¶
type DatabaseAPICreateDatabaseRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan where the database will be created.
HostingID string `json:"-"`
// DatabaseName: name of the database to be created.
DatabaseName string `json:"database_name"`
// NewUser: (Optional) Username and password to create a user and link to the database.
// Precisely one of NewUser, ExistingUsername must be set.
NewUser *CreateDatabaseRequestUser `json:"new_user,omitempty"`
// ExistingUsername: (Optional) Username to link an existing user to the database.
// Precisely one of NewUser, ExistingUsername must be set.
ExistingUsername *string `json:"existing_username,omitempty"`
}
DatabaseAPICreateDatabaseRequest: database api create database request.
type DatabaseAPICreateDatabaseUserRequest ¶
type DatabaseAPICreateDatabaseUserRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Username: name of the user to create.
Username string `json:"username"`
// Password: password of the user to create.
Password string `json:"password"`
}
DatabaseAPICreateDatabaseUserRequest: database api create database user request.
type DatabaseAPIDeleteDatabaseRequest ¶
type DatabaseAPIDeleteDatabaseRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// DatabaseName: name of the database to delete.
DatabaseName string `json:"-"`
}
DatabaseAPIDeleteDatabaseRequest: database api delete database request.
type DatabaseAPIDeleteDatabaseUserRequest ¶
type DatabaseAPIDeleteDatabaseUserRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Username: name of the database user to delete.
Username string `json:"-"`
}
DatabaseAPIDeleteDatabaseUserRequest: database api delete database user request.
type DatabaseAPIGetDatabaseRequest ¶
type DatabaseAPIGetDatabaseRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// DatabaseName: name of the database.
DatabaseName string `json:"-"`
}
DatabaseAPIGetDatabaseRequest: database api get database request.
type DatabaseAPIGetDatabaseUserRequest ¶
type DatabaseAPIGetDatabaseUserRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Username: name of the database user to retrieve details.
Username string `json:"-"`
}
DatabaseAPIGetDatabaseUserRequest: database api get database user request.
type DatabaseAPIListDatabaseUsersRequest ¶
type DatabaseAPIListDatabaseUsersRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Page: page number (must be a positive integer).
Page *int32 `json:"-"`
// PageSize: number of database users to return (must be a positive integer lower or equal to 100).
PageSize *uint32 `json:"-"`
// OrderBy: sort order of database users in the response.
// Default value: username_asc
OrderBy ListDatabaseUsersRequestOrderBy `json:"-"`
}
DatabaseAPIListDatabaseUsersRequest: database api list database users request.
type DatabaseAPIListDatabasesRequest ¶
type DatabaseAPIListDatabasesRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Page: page number (must be a positive integer).
Page *int32 `json:"-"`
// PageSize: number of databases to return (must be a positive integer lower or equal to 100).
PageSize *uint32 `json:"-"`
// OrderBy: sort order of databases in the response.
// Default value: database_name_asc
OrderBy ListDatabasesRequestOrderBy `json:"-"`
}
DatabaseAPIListDatabasesRequest: database api list databases request.
type DatabaseAPIUnassignDatabaseUserRequest ¶
type DatabaseAPIUnassignDatabaseUserRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// DatabaseName: name of the database to be unassigned.
DatabaseName string `json:"-"`
// Username: name of the user to unassign.
Username string `json:"username"`
}
DatabaseAPIUnassignDatabaseUserRequest: database api unassign database user request.
type DatabaseUser ¶
type DatabaseUser struct {
// Username: name of the database user.
Username string `json:"username"`
// Databases: list of databases accessible by the user.
Databases []string `json:"databases"`
}
DatabaseUser: database user.
type DnsAPI ¶
type DnsAPI struct {
// contains filtered or unexported fields
}
This API allows you to manage your Web Hosting services.
func (*DnsAPI) CheckUserOwnsDomain ¶
func (s *DnsAPI) CheckUserOwnsDomain(req *DNSAPICheckUserOwnsDomainRequest, opts ...scw.RequestOption) (*CheckUserOwnsDomainResponse, error)
CheckUserOwnsDomain: "Check whether you own this domain or not.".
func (*DnsAPI) GetDomainDNSRecords ¶
func (s *DnsAPI) GetDomainDNSRecords(req *DNSAPIGetDomainDNSRecordsRequest, opts ...scw.RequestOption) (*DNSRecords, error)
GetDomainDNSRecords: Get the set of DNS records of a specified domain associated with a Web Hosting plan's domain.
func (*DnsAPI) SyncDomainDNSRecords ¶
func (s *DnsAPI) SyncDomainDNSRecords(req *DNSAPISyncDomainDNSRecordsRequest, opts ...scw.RequestOption) (*DNSRecords, error)
SyncDomainDNSRecords: "Synchronize your DNS records on the Elements Console and on cPanel.".
type FtpAccount ¶
type FtpAccount struct {
// Username: the username of the FTP account.
Username string `json:"username"`
// Path: the path associated with the FTP account.
Path string `json:"path"`
}
FtpAccount: ftp account.
type FtpAccountAPI ¶
type FtpAccountAPI struct {
// contains filtered or unexported fields
}
This API allows you to manage your FTP accounts for your Web Hosting services.
func NewFtpAccountAPI ¶
func NewFtpAccountAPI(client *scw.Client) *FtpAccountAPI
NewFtpAccountAPI returns a FtpAccountAPI object from a Scaleway client.
func (*FtpAccountAPI) ChangeFtpAccountPassword ¶
func (s *FtpAccountAPI) ChangeFtpAccountPassword(req *FtpAccountAPIChangeFtpAccountPasswordRequest, opts ...scw.RequestOption) (*FtpAccount, error)
ChangeFtpAccountPassword:
func (*FtpAccountAPI) CreateFtpAccount ¶
func (s *FtpAccountAPI) CreateFtpAccount(req *FtpAccountAPICreateFtpAccountRequest, opts ...scw.RequestOption) (*FtpAccount, error)
CreateFtpAccount: Create a new FTP account within your hosting plan.
func (*FtpAccountAPI) ListFtpAccounts ¶
func (s *FtpAccountAPI) ListFtpAccounts(req *FtpAccountAPIListFtpAccountsRequest, opts ...scw.RequestOption) (*ListFtpAccountsResponse, error)
ListFtpAccounts: List all FTP accounts within your hosting plan.
func (*FtpAccountAPI) Regions ¶
func (s *FtpAccountAPI) Regions() []scw.Region
func (*FtpAccountAPI) RemoveFtpAccount ¶
func (s *FtpAccountAPI) RemoveFtpAccount(req *FtpAccountAPIRemoveFtpAccountRequest, opts ...scw.RequestOption) (*FtpAccount, error)
RemoveFtpAccount: Delete a specific FTP account within your hosting plan.
type FtpAccountAPIChangeFtpAccountPasswordRequest ¶
type FtpAccountAPIChangeFtpAccountPasswordRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Username: username of the FTP account.
Username string `json:"-"`
// Password: new password for the FTP account.
Password string `json:"password"`
}
FtpAccountAPIChangeFtpAccountPasswordRequest: ftp account api change ftp account password request.
type FtpAccountAPICreateFtpAccountRequest ¶
type FtpAccountAPICreateFtpAccountRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Username: username for the new FTP account.
Username string `json:"username"`
// Path: path for the new FTP account.
Path string `json:"path"`
// Password: password for the new FTP account.
Password string `json:"password"`
}
FtpAccountAPICreateFtpAccountRequest: ftp account api create ftp account request.
type FtpAccountAPIListFtpAccountsRequest ¶
type FtpAccountAPIListFtpAccountsRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Page: page number (must be a positive integer).
Page *int32 `json:"-"`
// PageSize: number of FTP accounts to return (must be a positive integer lower or equal to 100).
PageSize *uint32 `json:"-"`
// OrderBy: sort order of FTP accounts in the response.
// Default value: username_asc
OrderBy ListFtpAccountsRequestOrderBy `json:"-"`
// Domain: domain to filter the FTP accounts.
Domain *string `json:"-"`
}
FtpAccountAPIListFtpAccountsRequest: ftp account api list ftp accounts request.
type FtpAccountAPIRemoveFtpAccountRequest ¶
type FtpAccountAPIRemoveFtpAccountRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Username: username of the FTP account to be deleted.
Username string `json:"-"`
}
FtpAccountAPIRemoveFtpAccountRequest: ftp account api remove ftp account request.
type Hosting ¶
type Hosting struct {
// ID: ID of the Web Hosting plan.
ID string `json:"id"`
// ProjectID: ID of the Scaleway Project the Web Hosting plan belongs to.
ProjectID string `json:"project_id"`
// UpdatedAt: date on which the Web Hosting plan was last updated.
UpdatedAt *time.Time `json:"updated_at"`
// CreatedAt: date on which the Web Hosting plan was created.
CreatedAt *time.Time `json:"created_at"`
// Status: status of the Web Hosting plan.
// Default value: unknown_status
Status HostingStatus `json:"status"`
// Domain: main domain associated with the Web Hosting plan.
Domain string `json:"domain"`
// Offer: details of the Web Hosting plan offer and options.
Offer *Offer `json:"offer"`
// Platform: details of the hosting platform.
Platform *Platform `json:"platform"`
// Tags: list of tags associated with the Web Hosting plan.
Tags []string `json:"tags"`
// DNSStatus: DNS status of the Web Hosting plan.
// Default value: unknown_status
DNSStatus DNSRecordsStatus `json:"dns_status"`
// IPv4: current IPv4 address of the hosting.
IPv4 net.IP `json:"ipv4"`
// Protected: whether the hosting is protected or not.
Protected bool `json:"protected"`
// User: details of the hosting user.
User *HostingUser `json:"user"`
// Region: region where the Web Hosting plan is hosted.
Region scw.Region `json:"region"`
}
Hosting: hosting.
type HostingAPI ¶
type HostingAPI struct {
// contains filtered or unexported fields
}
This API allows you to manage your Web Hosting services.
func NewHostingAPI ¶
func NewHostingAPI(client *scw.Client) *HostingAPI
NewHostingAPI returns a HostingAPI object from a Scaleway client.
func (*HostingAPI) CreateHosting ¶
func (s *HostingAPI) CreateHosting(req *HostingAPICreateHostingRequest, opts ...scw.RequestOption) (*Hosting, error)
CreateHosting: Order a Web Hosting plan, specifying the offer type required via the `offer_id` parameter.
func (*HostingAPI) CreateSession ¶
func (s *HostingAPI) CreateSession(req *HostingAPICreateSessionRequest, opts ...scw.RequestOption) (*Session, error)
CreateSession: Create a user session.
func (*HostingAPI) DeleteHosting ¶
func (s *HostingAPI) DeleteHosting(req *HostingAPIDeleteHostingRequest, opts ...scw.RequestOption) (*Hosting, error)
DeleteHosting: Delete a Web Hosting plan, specified by its `hosting_id`. Note that deletion is not immediate: it will take place at the end of the calendar month, after which time your Web Hosting plan and all its data (files and emails) will be irreversibly lost.
func (*HostingAPI) GetHosting ¶
func (s *HostingAPI) GetHosting(req *HostingAPIGetHostingRequest, opts ...scw.RequestOption) (*Hosting, error)
GetHosting: Get the details of one of your existing Web Hosting plans, specified by its `hosting_id`.
func (*HostingAPI) GetResourceSummary ¶
func (s *HostingAPI) GetResourceSummary(req *HostingAPIGetResourceSummaryRequest, opts ...scw.RequestOption) (*ResourceSummary, error)
GetResourceSummary: Get the total counts of websites, databases, email accounts, and FTP accounts of a Web Hosting plan.
func (*HostingAPI) ListHostings ¶
func (s *HostingAPI) ListHostings(req *HostingAPIListHostingsRequest, opts ...scw.RequestOption) (*ListHostingsResponse, error)
ListHostings: List all of your existing Web Hosting plans. Various filters are available to limit the results, including filtering by domain, status, tag and Project ID.
func (*HostingAPI) Regions ¶
func (s *HostingAPI) Regions() []scw.Region
func (*HostingAPI) ResetHostingPassword ¶
func (s *HostingAPI) ResetHostingPassword(req *HostingAPIResetHostingPasswordRequest, opts ...scw.RequestOption) (*ResetHostingPasswordResponse, error)
ResetHostingPassword: Reset a Web Hosting plan password.
func (*HostingAPI) UpdateHosting ¶
func (s *HostingAPI) UpdateHosting(req *HostingAPIUpdateHostingRequest, opts ...scw.RequestOption) (*Hosting, error)
UpdateHosting: Update the details of one of your existing Web Hosting plans, specified by its `hosting_id`. You can update parameters including the contact email address, tags, options and offer.
type HostingAPICreateHostingRequest ¶
type HostingAPICreateHostingRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// OfferID: ID of the selected offer for the Web Hosting plan.
OfferID string `json:"offer_id"`
// ProjectID: ID of the Scaleway Project in which to create the Web Hosting plan.
ProjectID string `json:"project_id"`
// Email: contact email for the Web Hosting client.
Email string `json:"email"`
// Tags: list of tags for the Web Hosting plan.
Tags []string `json:"tags"`
// Domain: domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand.
Domain string `json:"domain"`
// OfferOptions: list of the Web Hosting plan options IDs with their quantities.
OfferOptions []*OfferOptionRequest `json:"offer_options"`
// Language: default language for the control panel interface.
// Default value: unknown_language_code
Language std.LanguageCode `json:"language"`
// DomainConfiguration: indicates whether to update hosting domain name servers and DNS records for domains managed by Scaleway Elements.
DomainConfiguration *CreateHostingRequestDomainConfiguration `json:"domain_configuration,omitempty"`
// SkipWelcomeEmail: indicates whether to skip a welcome email to the contact email containing hosting info.
SkipWelcomeEmail *bool `json:"skip_welcome_email,omitempty"`
}
HostingAPICreateHostingRequest: hosting api create hosting request.
type HostingAPICreateSessionRequest ¶
type HostingAPICreateSessionRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: hosting ID.
HostingID string `json:"-"`
}
HostingAPICreateSessionRequest: hosting api create session request.
type HostingAPIDeleteHostingRequest ¶
type HostingAPIDeleteHostingRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: hosting ID.
HostingID string `json:"-"`
}
HostingAPIDeleteHostingRequest: hosting api delete hosting request.
type HostingAPIGetHostingRequest ¶
type HostingAPIGetHostingRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: hosting ID.
HostingID string `json:"-"`
}
HostingAPIGetHostingRequest: hosting api get hosting request.
type HostingAPIGetResourceSummaryRequest ¶
type HostingAPIGetResourceSummaryRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: hosting ID.
HostingID string `json:"-"`
}
HostingAPIGetResourceSummaryRequest: hosting api get resource summary request.
type HostingAPIListHostingsRequest ¶
type HostingAPIListHostingsRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Page: page number to return, from the paginated results (must be a positive integer).
Page *int32 `json:"-"`
// PageSize: number of Web Hosting plans to return (must be a positive integer lower or equal to 100).
PageSize *uint32 `json:"-"`
// OrderBy: sort order for Web Hosting plans in the response.
// Default value: created_at_asc
OrderBy ListHostingsRequestOrderBy `json:"-"`
// Tags: tags to filter for, only Web Hosting plans with matching tags will be returned.
Tags []string `json:"-"`
// Statuses: statuses to filter for, only Web Hosting plans with matching statuses will be returned.
Statuses []HostingStatus `json:"-"`
// Domain: domain to filter for, only Web Hosting plans associated with this domain will be returned.
Domain *string `json:"-"`
// ProjectID: project ID to filter for, only Web Hosting plans from this Project will be returned.
ProjectID *string `json:"-"`
// OrganizationID: organization ID to filter for, only Web Hosting plans from this Organization will be returned.
OrganizationID *string `json:"-"`
// ControlPanels: name of the control panel to filter for, only Web Hosting plans from this control panel will be returned.
ControlPanels []string `json:"-"`
}
HostingAPIListHostingsRequest: hosting api list hostings request.
type HostingAPIResetHostingPasswordRequest ¶
type HostingAPIResetHostingPasswordRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting.
HostingID string `json:"-"`
}
HostingAPIResetHostingPasswordRequest: hosting api reset hosting password request.
type HostingAPIUpdateHostingRequest ¶
type HostingAPIUpdateHostingRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: hosting ID.
HostingID string `json:"-"`
// Email: new contact email for the Web Hosting plan.
Email *string `json:"email,omitempty"`
// Tags: new tags for the Web Hosting plan.
Tags *[]string `json:"tags,omitempty"`
// OfferOptions: list of the Web Hosting plan options IDs with their quantities.
OfferOptions []*OfferOptionRequest `json:"offer_options"`
// OfferID: ID of the new offer for the Web Hosting plan.
OfferID *string `json:"offer_id,omitempty"`
// Protected: whether the hosting is protected or not.
Protected *bool `json:"protected,omitempty"`
}
HostingAPIUpdateHostingRequest: hosting api update hosting request.
type HostingStatus ¶
type HostingStatus string
func (HostingStatus) MarshalJSON ¶
func (enum HostingStatus) MarshalJSON() ([]byte, error)
func (HostingStatus) String ¶
func (enum HostingStatus) String() string
func (*HostingStatus) UnmarshalJSON ¶
func (enum *HostingStatus) UnmarshalJSON(data []byte) error
func (HostingStatus) Values ¶
func (enum HostingStatus) Values() []HostingStatus
type HostingSummary ¶
type HostingSummary struct {
// ID: ID of the Web Hosting plan.
ID string `json:"id"`
// ProjectID: ID of the Scaleway Project the Web Hosting plan belongs to.
ProjectID string `json:"project_id"`
// CreatedAt: date on which the Web Hosting plan was created.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: date on which the Web Hosting plan was last updated.
UpdatedAt *time.Time `json:"updated_at"`
// Status: status of the Web Hosting plan.
// Default value: unknown_status
Status HostingSummaryStatus `json:"status"`
// Domain: main domain associated with the Web Hosting plan.
Domain string `json:"domain"`
// Protected: whether the hosting is protected or not.
Protected bool `json:"protected"`
// DNSStatus: DNS status of the Web Hosting plan.
// Default value: unknown_status
DNSStatus DNSRecordsStatus `json:"dns_status"`
// OfferName: name of the active offer for the Web Hosting plan.
OfferName string `json:"offer_name"`
// Region: region where the Web Hosting plan is hosted.
Region scw.Region `json:"region"`
}
HostingSummary: hosting summary.
type HostingSummaryStatus ¶
type HostingSummaryStatus string
func (HostingSummaryStatus) MarshalJSON ¶
func (enum HostingSummaryStatus) MarshalJSON() ([]byte, error)
func (HostingSummaryStatus) String ¶
func (enum HostingSummaryStatus) String() string
func (*HostingSummaryStatus) UnmarshalJSON ¶
func (enum *HostingSummaryStatus) UnmarshalJSON(data []byte) error
func (HostingSummaryStatus) Values ¶
func (enum HostingSummaryStatus) Values() []HostingSummaryStatus
type HostingUser ¶
type HostingUser struct {
// Username: main Web Hosting cPanel username.
Username string `json:"username"`
// OneTimePassword: one-time-password used for the first login or reset password, empty after first use.
OneTimePassword *string `json:"one_time_password"`
// ContactEmail: contact email used for the hosting.
ContactEmail string `json:"contact_email"`
}
HostingUser: hosting user.
type ListControlPanelsResponse ¶
type ListControlPanelsResponse struct {
// TotalCount: number of control panels returned.
TotalCount uint64 `json:"total_count"`
// ControlPanels: list of control panels.
ControlPanels []*ControlPanel `json:"control_panels"`
}
ListControlPanelsResponse: list control panels response.
func (*ListControlPanelsResponse) UnsafeAppend ¶
func (r *ListControlPanelsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListControlPanelsResponse) UnsafeGetTotalCount ¶
func (r *ListControlPanelsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListDatabaseUsersRequestOrderBy ¶
type ListDatabaseUsersRequestOrderBy string
func (ListDatabaseUsersRequestOrderBy) MarshalJSON ¶
func (enum ListDatabaseUsersRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListDatabaseUsersRequestOrderBy) String ¶
func (enum ListDatabaseUsersRequestOrderBy) String() string
func (*ListDatabaseUsersRequestOrderBy) UnmarshalJSON ¶
func (enum *ListDatabaseUsersRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListDatabaseUsersRequestOrderBy) Values ¶
func (enum ListDatabaseUsersRequestOrderBy) Values() []ListDatabaseUsersRequestOrderBy
type ListDatabaseUsersResponse ¶
type ListDatabaseUsersResponse struct {
// TotalCount: total number of database users.
TotalCount uint64 `json:"total_count"`
// Users: list of database users.
Users []*DatabaseUser `json:"users"`
}
ListDatabaseUsersResponse: list database users response.
func (*ListDatabaseUsersResponse) UnsafeAppend ¶
func (r *ListDatabaseUsersResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListDatabaseUsersResponse) UnsafeGetTotalCount ¶
func (r *ListDatabaseUsersResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListDatabasesRequestOrderBy ¶
type ListDatabasesRequestOrderBy string
func (ListDatabasesRequestOrderBy) MarshalJSON ¶
func (enum ListDatabasesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListDatabasesRequestOrderBy) String ¶
func (enum ListDatabasesRequestOrderBy) String() string
func (*ListDatabasesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListDatabasesRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListDatabasesRequestOrderBy) Values ¶
func (enum ListDatabasesRequestOrderBy) Values() []ListDatabasesRequestOrderBy
type ListDatabasesResponse ¶
type ListDatabasesResponse struct {
// TotalCount: total number of databases.
TotalCount uint64 `json:"total_count"`
// Databases: list of databases.
Databases []*Database `json:"databases"`
}
ListDatabasesResponse: list databases response.
func (*ListDatabasesResponse) UnsafeAppend ¶
func (r *ListDatabasesResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListDatabasesResponse) UnsafeGetTotalCount ¶
func (r *ListDatabasesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListFtpAccountsRequestOrderBy ¶
type ListFtpAccountsRequestOrderBy string
func (ListFtpAccountsRequestOrderBy) MarshalJSON ¶
func (enum ListFtpAccountsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListFtpAccountsRequestOrderBy) String ¶
func (enum ListFtpAccountsRequestOrderBy) String() string
func (*ListFtpAccountsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListFtpAccountsRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListFtpAccountsRequestOrderBy) Values ¶
func (enum ListFtpAccountsRequestOrderBy) Values() []ListFtpAccountsRequestOrderBy
type ListFtpAccountsResponse ¶
type ListFtpAccountsResponse struct {
// TotalCount: total number of FTP accounts.
TotalCount uint64 `json:"total_count"`
// FtpAccounts: list of FTP accounts.
FtpAccounts []*FtpAccount `json:"ftp_accounts"`
}
ListFtpAccountsResponse: list ftp accounts response.
func (*ListFtpAccountsResponse) UnsafeAppend ¶
func (r *ListFtpAccountsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListFtpAccountsResponse) UnsafeGetTotalCount ¶
func (r *ListFtpAccountsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListHostingsRequestOrderBy ¶
type ListHostingsRequestOrderBy string
func (ListHostingsRequestOrderBy) MarshalJSON ¶
func (enum ListHostingsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListHostingsRequestOrderBy) String ¶
func (enum ListHostingsRequestOrderBy) String() string
func (*ListHostingsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListHostingsRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListHostingsRequestOrderBy) Values ¶
func (enum ListHostingsRequestOrderBy) Values() []ListHostingsRequestOrderBy
type ListHostingsResponse ¶
type ListHostingsResponse struct {
// TotalCount: number of Web Hosting plans returned.
TotalCount uint64 `json:"total_count"`
// Hostings: list of Web Hosting plans.
Hostings []*HostingSummary `json:"hostings"`
}
ListHostingsResponse: list hostings response.
func (*ListHostingsResponse) UnsafeAppend ¶
func (r *ListHostingsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListHostingsResponse) UnsafeGetTotalCount ¶
func (r *ListHostingsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListMailAccountsRequestOrderBy ¶
type ListMailAccountsRequestOrderBy string
func (ListMailAccountsRequestOrderBy) MarshalJSON ¶
func (enum ListMailAccountsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListMailAccountsRequestOrderBy) String ¶
func (enum ListMailAccountsRequestOrderBy) String() string
func (*ListMailAccountsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListMailAccountsRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListMailAccountsRequestOrderBy) Values ¶
func (enum ListMailAccountsRequestOrderBy) Values() []ListMailAccountsRequestOrderBy
type ListMailAccountsResponse ¶
type ListMailAccountsResponse struct {
// TotalCount: total number of mail accounts.
TotalCount uint64 `json:"total_count"`
// MailAccounts: list of mail accounts.
MailAccounts []*MailAccount `json:"mail_accounts"`
}
ListMailAccountsResponse: list mail accounts response.
func (*ListMailAccountsResponse) UnsafeAppend ¶
func (r *ListMailAccountsResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListMailAccountsResponse) UnsafeGetTotalCount ¶
func (r *ListMailAccountsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListOffersRequestOrderBy ¶
type ListOffersRequestOrderBy string
func (ListOffersRequestOrderBy) MarshalJSON ¶
func (enum ListOffersRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListOffersRequestOrderBy) String ¶
func (enum ListOffersRequestOrderBy) String() string
func (*ListOffersRequestOrderBy) UnmarshalJSON ¶
func (enum *ListOffersRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListOffersRequestOrderBy) Values ¶
func (enum ListOffersRequestOrderBy) Values() []ListOffersRequestOrderBy
type ListOffersResponse ¶
type ListOffersResponse struct {
// TotalCount: total number of offers.
TotalCount uint64 `json:"total_count"`
// Offers: list of offers.
Offers []*Offer `json:"offers"`
}
ListOffersResponse: list offers response.
func (*ListOffersResponse) UnsafeAppend ¶
func (r *ListOffersResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListOffersResponse) UnsafeGetTotalCount ¶
func (r *ListOffersResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListWebsitesRequestOrderBy ¶
type ListWebsitesRequestOrderBy string
func (ListWebsitesRequestOrderBy) MarshalJSON ¶
func (enum ListWebsitesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListWebsitesRequestOrderBy) String ¶
func (enum ListWebsitesRequestOrderBy) String() string
func (*ListWebsitesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListWebsitesRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListWebsitesRequestOrderBy) Values ¶
func (enum ListWebsitesRequestOrderBy) Values() []ListWebsitesRequestOrderBy
type ListWebsitesResponse ¶
type ListWebsitesResponse struct {
// TotalCount: total number of websites.
TotalCount uint64 `json:"total_count"`
// Websites: list of websites.
Websites []*Website `json:"websites"`
}
ListWebsitesResponse: list websites response.
func (*ListWebsitesResponse) UnsafeAppend ¶
func (r *ListWebsitesResponse) UnsafeAppend(res interface{}) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListWebsitesResponse) UnsafeGetTotalCount ¶
func (r *ListWebsitesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type MailAccount ¶
type MailAccount struct {
// Domain: domain part of the mail account address.
Domain string `json:"domain"`
// Username: username part address of the mail account address.
Username string `json:"username"`
}
MailAccount: mail account.
type MailAccountAPI ¶
type MailAccountAPI struct {
// contains filtered or unexported fields
}
This API allows you to manage your mail accounts for your Web Hosting services.
func NewMailAccountAPI ¶
func NewMailAccountAPI(client *scw.Client) *MailAccountAPI
NewMailAccountAPI returns a MailAccountAPI object from a Scaleway client.
func (*MailAccountAPI) ChangeMailAccountPassword ¶
func (s *MailAccountAPI) ChangeMailAccountPassword(req *MailAccountAPIChangeMailAccountPasswordRequest, opts ...scw.RequestOption) (*MailAccount, error)
ChangeMailAccountPassword: Update the password of a mail account within your hosting plan.
func (*MailAccountAPI) CreateMailAccount ¶
func (s *MailAccountAPI) CreateMailAccount(req *MailAccountAPICreateMailAccountRequest, opts ...scw.RequestOption) (*MailAccount, error)
CreateMailAccount: Create a new mail account within your hosting plan.
func (*MailAccountAPI) ListMailAccounts ¶
func (s *MailAccountAPI) ListMailAccounts(req *MailAccountAPIListMailAccountsRequest, opts ...scw.RequestOption) (*ListMailAccountsResponse, error)
ListMailAccounts: List all mail accounts within your hosting plan.
func (*MailAccountAPI) Regions ¶
func (s *MailAccountAPI) Regions() []scw.Region
func (*MailAccountAPI) RemoveMailAccount ¶
func (s *MailAccountAPI) RemoveMailAccount(req *MailAccountAPIRemoveMailAccountRequest, opts ...scw.RequestOption) (*MailAccount, error)
RemoveMailAccount: Delete a mail account within your hosting plan.
type MailAccountAPIChangeMailAccountPasswordRequest ¶
type MailAccountAPIChangeMailAccountPasswordRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Domain: domain part of the mail account address.
Domain string `json:"domain"`
// Username: username part of the mail account address.
Username string `json:"username"`
// Password: new password for the mail account.
Password string `json:"password"`
}
MailAccountAPIChangeMailAccountPasswordRequest: mail account api change mail account password request.
type MailAccountAPICreateMailAccountRequest ¶
type MailAccountAPICreateMailAccountRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Domain: domain part of the mail account address.
Domain string `json:"domain"`
// Username: username part address of the mail account address.
Username string `json:"username"`
// Password: password for the new mail account.
Password string `json:"password"`
}
MailAccountAPICreateMailAccountRequest: mail account api create mail account request.
type MailAccountAPIListMailAccountsRequest ¶
type MailAccountAPIListMailAccountsRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Page: page number (must be a positive integer).
Page *int32 `json:"-"`
// PageSize: number of mail accounts to return (must be a positive integer lower or equal to 100).
PageSize *uint32 `json:"-"`
// OrderBy: sort order of mail accounts in the response.
// Default value: username_asc
OrderBy ListMailAccountsRequestOrderBy `json:"-"`
// Domain: domain to filter the mail accounts.
Domain *string `json:"-"`
}
MailAccountAPIListMailAccountsRequest: mail account api list mail accounts request.
type MailAccountAPIRemoveMailAccountRequest ¶
type MailAccountAPIRemoveMailAccountRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Domain: domain part of the mail account address.
Domain string `json:"domain"`
// Username: username part of the mail account address.
Username string `json:"username"`
}
MailAccountAPIRemoveMailAccountRequest: mail account api remove mail account request.
type Nameserver ¶
type Nameserver struct {
// Hostname: hostname of the nameserver.
Hostname string `json:"hostname"`
// Status: status of the nameserver.
// Default value: unknown_status
Status NameserverStatus `json:"status"`
// IsDefault: defines whether the nameserver is the default one.
IsDefault bool `json:"is_default"`
}
Nameserver: nameserver.
type NameserverStatus ¶
type NameserverStatus string
func (NameserverStatus) MarshalJSON ¶
func (enum NameserverStatus) MarshalJSON() ([]byte, error)
func (NameserverStatus) String ¶
func (enum NameserverStatus) String() string
func (*NameserverStatus) UnmarshalJSON ¶
func (enum *NameserverStatus) UnmarshalJSON(data []byte) error
func (NameserverStatus) Values ¶
func (enum NameserverStatus) Values() []NameserverStatus
type Offer ¶
type Offer struct {
// ID: offer ID.
ID string `json:"id"`
// Name: offer name.
Name string `json:"name"`
// BillingOperationPath: unique identifier used for billing.
BillingOperationPath string `json:"billing_operation_path"`
// Options: options available for the offer.
Options []*OfferOption `json:"options"`
// Price: price of the offer.
Price *scw.Money `json:"price"`
// Available: if a hosting_id was specified in the call, defines whether the offer is available for a specified hosting plan to migrate (update) to.
Available bool `json:"available"`
// ControlPanelName: name of the control panel.
ControlPanelName string `json:"control_panel_name"`
// EndOfLife: indicates if the offer has reached its end of life.
EndOfLife bool `json:"end_of_life"`
// QuotaWarning: defines a warning if the maximum value for an option in the offer is exceeded.
// Default value: unknown_warning
QuotaWarning OfferOptionWarning `json:"quota_warning"`
}
Offer: offer.
type OfferAPI ¶
type OfferAPI struct {
// contains filtered or unexported fields
}
This API allows you to manage your offer for your Web Hosting services.
func NewOfferAPI ¶
NewOfferAPI returns a OfferAPI object from a Scaleway client.
func (*OfferAPI) ListOffers ¶
func (s *OfferAPI) ListOffers(req *OfferAPIListOffersRequest, opts ...scw.RequestOption) (*ListOffersResponse, error)
ListOffers: List all available hosting offers along with their specific options.
type OfferAPIListOffersRequest ¶
type OfferAPIListOffersRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// Page: page number (must be a positive integer).
Page *int32 `json:"-"`
// PageSize: number of websites to return (must be a positive integer lower or equal to 100).
PageSize *uint32 `json:"-"`
// OrderBy: sort order for Web Hosting offers in the response.
// Default value: price_asc
OrderBy ListOffersRequestOrderBy `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID *string `json:"-"`
// ControlPanels: name of the control panel(s) to filter for.
ControlPanels []string `json:"-"`
}
OfferAPIListOffersRequest: offer api list offers request.
type OfferOption ¶
type OfferOption struct {
// ID: option ID.
ID string `json:"id"`
// Name: name of the option.
// Default value: unknown_name
Name OfferOptionName `json:"name"`
// BillingOperationPath: unique identifier used for billing.
BillingOperationPath string `json:"billing_operation_path"`
// MinValue: minimum value for the option in the offer.
MinValue int32 `json:"min_value"`
// CurrentValue: if a hosting_id was specified in the call, defines the current value of the option in the hosting.
CurrentValue int32 `json:"current_value"`
// MaxValue: maximum value for the option in the offer.
MaxValue int32 `json:"max_value"`
// QuotaWarning: defines a warning if the maximum value for the option has been reached.
// Default value: unknown_warning
QuotaWarning OfferOptionWarning `json:"quota_warning"`
// Price: price of the option for 1 value.
Price *scw.Money `json:"price"`
}
OfferOption: offer option.
type OfferOptionName ¶
type OfferOptionName string
func (OfferOptionName) MarshalJSON ¶
func (enum OfferOptionName) MarshalJSON() ([]byte, error)
func (OfferOptionName) String ¶
func (enum OfferOptionName) String() string
func (*OfferOptionName) UnmarshalJSON ¶
func (enum *OfferOptionName) UnmarshalJSON(data []byte) error
func (OfferOptionName) Values ¶
func (enum OfferOptionName) Values() []OfferOptionName
type OfferOptionRequest ¶
type OfferOptionRequest struct {
// ID: offer option ID.
ID string `json:"id"`
// Quantity: the option requested quantity to set for the Web Hosting plan.
Quantity int64 `json:"quantity"`
}
OfferOptionRequest: offer option request.
type OfferOptionWarning ¶
type OfferOptionWarning string
func (OfferOptionWarning) MarshalJSON ¶
func (enum OfferOptionWarning) MarshalJSON() ([]byte, error)
func (OfferOptionWarning) String ¶
func (enum OfferOptionWarning) String() string
func (*OfferOptionWarning) UnmarshalJSON ¶
func (enum *OfferOptionWarning) UnmarshalJSON(data []byte) error
func (OfferOptionWarning) Values ¶
func (enum OfferOptionWarning) Values() []OfferOptionWarning
type Platform ¶
type Platform struct {
// Hostname: hostname of the host platform.
Hostname string `json:"hostname"`
// Number: number of the host platform.
Number int32 `json:"number"`
// GroupName: group name of the hosting's host platform.
// Default value: unknown_group
GroupName PlatformPlatformGroup `json:"group_name"`
// IPv4: iPv4 address of the hosting's host platform.
IPv4 net.IP `json:"ipv4"`
// IPv6: iPv6 address of the hosting's host platform.
IPv6 net.IP `json:"ipv6"`
// ControlPanel: details of the platform control panel.
ControlPanel *PlatformControlPanel `json:"control_panel"`
}
Platform: platform.
type PlatformControlPanel ¶
type PlatformControlPanel struct {
// Name: name of the control panel.
Name string `json:"name"`
// URLs: URL to connect to cPanel dashboard and to Webmail interface.
URLs *PlatformControlPanelURLs `json:"urls"`
}
PlatformControlPanel: platform control panel.
type PlatformControlPanelURLs ¶
type PlatformControlPanelURLs struct {
// Dashboard: URL to connect to the hosting control panel dashboard.
Dashboard string `json:"dashboard"`
// Webmail: URL to connect to the hosting Webmail interface.
Webmail string `json:"webmail"`
}
PlatformControlPanelURLs: platform control panel ur ls.
type PlatformPlatformGroup ¶
type PlatformPlatformGroup string
func (PlatformPlatformGroup) MarshalJSON ¶
func (enum PlatformPlatformGroup) MarshalJSON() ([]byte, error)
func (PlatformPlatformGroup) String ¶
func (enum PlatformPlatformGroup) String() string
func (*PlatformPlatformGroup) UnmarshalJSON ¶
func (enum *PlatformPlatformGroup) UnmarshalJSON(data []byte) error
func (PlatformPlatformGroup) Values ¶
func (enum PlatformPlatformGroup) Values() []PlatformPlatformGroup
type ResetHostingPasswordResponse ¶
type ResetHostingPasswordResponse struct {
// OneTimePassword: new temporary password.
OneTimePassword string `json:"one_time_password"`
}
ResetHostingPasswordResponse: reset hosting password response.
type ResourceSummary ¶
type ResourceSummary struct {
// DatabasesCount: total number of active databases in the Web Hosting plan.
DatabasesCount uint32 `json:"databases_count"`
// MailAccountsCount: total number of active email accounts in the Web Hosting plan.
MailAccountsCount uint32 `json:"mail_accounts_count"`
// FtpAccountsCount: total number of active FTP accounts in the Web Hosting plan.
FtpAccountsCount uint32 `json:"ftp_accounts_count"`
// WebsitesCount: total number of active domains in the the Web Hosting plan.
WebsitesCount uint32 `json:"websites_count"`
}
ResourceSummary: resource summary.
type Session ¶
type Session struct {
// URL: logged user's session URL.
URL string `json:"url"`
}
Session: session.
type SyncDomainDNSRecordsRequestRecord ¶
type SyncDomainDNSRecordsRequestRecord struct {
Name string `json:"name"`
// Type: default value: unknown_type
Type DNSRecordType `json:"type"`
}
SyncDomainDNSRecordsRequestRecord: sync domain dns records request record.
type Website ¶
type Website struct {
// Domain: the domain of the website.
Domain string `json:"domain"`
// Path: the directory path of the website.
Path string `json:"path"`
// SslStatus: the SSL status of the website.
SslStatus bool `json:"ssl_status"`
}
Website: website.
type WebsiteAPI ¶
type WebsiteAPI struct {
// contains filtered or unexported fields
}
This API allows you to manage your websites for your Web Hosting services.
func NewWebsiteAPI ¶
func NewWebsiteAPI(client *scw.Client) *WebsiteAPI
NewWebsiteAPI returns a WebsiteAPI object from a Scaleway client.
func (*WebsiteAPI) ListWebsites ¶
func (s *WebsiteAPI) ListWebsites(req *WebsiteAPIListWebsitesRequest, opts ...scw.RequestOption) (*ListWebsitesResponse, error)
ListWebsites: List all websites for a specific hosting.
func (*WebsiteAPI) Regions ¶
func (s *WebsiteAPI) Regions() []scw.Region
type WebsiteAPIListWebsitesRequest ¶
type WebsiteAPIListWebsitesRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`
// HostingID: UUID of the hosting plan.
HostingID string `json:"-"`
// Page: page number (must be a positive integer).
Page *int32 `json:"-"`
// PageSize: number of websites to return (must be a positive integer lower or equal to 100).
PageSize *uint32 `json:"-"`
// OrderBy: sort order for Web Hosting websites in the response.
// Default value: domain_asc
OrderBy ListWebsitesRequestOrderBy `json:"-"`
}
WebsiteAPIListWebsitesRequest: website api list websites request.