Google Cloud SQL 的 GoLang 客户端库是否功能齐全?如何开始?我只能找到列表数据库实例示例:
https://cloud.google.com/sql/docs/postgres/admin-api/libraries
最佳答案
Here is the complete api -- 它是测试版,但相当完整
type AclEntry
func (s *AclEntry) MarshalJSON() ([]byte, error)
type ApiWarning
func (s *ApiWarning) MarshalJSON() ([]byte, error)
type BackupConfiguration
func (s *BackupConfiguration) MarshalJSON() ([]byte, error)
type BackupRun
func (s *BackupRun) MarshalJSON() ([]byte, error)
type BackupRunsDeleteCall
func (c *BackupRunsDeleteCall) Context(ctx context.Context) *BackupRunsDeleteCall
func (c *BackupRunsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *BackupRunsDeleteCall) Fields(s ...googleapi.Field) *BackupRunsDeleteCall
func (c *BackupRunsDeleteCall) Header() http.Header
type BackupRunsGetCall
func (c *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall
func (c *BackupRunsGetCall) Do(opts ...googleapi.CallOption) (*BackupRun, error)
func (c *BackupRunsGetCall) Fields(s ...googleapi.Field) *BackupRunsGetCall
func (c *BackupRunsGetCall) Header() http.Header
func (c *BackupRunsGetCall) IfNoneMatch(entityTag string) *BackupRunsGetCall
type BackupRunsInsertCall
func (c *BackupRunsInsertCall) Context(ctx context.Context) *BackupRunsInsertCall
func (c *BackupRunsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *BackupRunsInsertCall) Fields(s ...googleapi.Field) *BackupRunsInsertCall
func (c *BackupRunsInsertCall) Header() http.Header
type BackupRunsListCall
func (c *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall
func (c *BackupRunsListCall) Do(opts ...googleapi.CallOption) (*BackupRunsListResponse, error)
func (c *BackupRunsListCall) Fields(s ...googleapi.Field) *BackupRunsListCall
func (c *BackupRunsListCall) Header() http.Header
func (c *BackupRunsListCall) IfNoneMatch(entityTag string) *BackupRunsListCall
func (c *BackupRunsListCall) MaxResults(maxResults int64) *BackupRunsListCall
func (c *BackupRunsListCall) PageToken(pageToken string) *BackupRunsListCall
func (c *BackupRunsListCall) Pages(ctx context.Context, f func(*BackupRunsListResponse) error) error
type BackupRunsListResponse
func (s *BackupRunsListResponse) MarshalJSON() ([]byte, error)
type BackupRunsService
func NewBackupRunsService(s *Service) *BackupRunsService
func (r *BackupRunsService) Delete(project string, instance string, id int64) *BackupRunsDeleteCall
func (r *BackupRunsService) Get(project string, instance string, id int64) *BackupRunsGetCall
func (r *BackupRunsService) Insert(project string, instance string, backuprun *BackupRun) *BackupRunsInsertCall
func (r *BackupRunsService) List(project string, instance string) *BackupRunsListCall
type BinLogCoordinates
func (s *BinLogCoordinates) MarshalJSON() ([]byte, error)
type CloneContext
func (s *CloneContext) MarshalJSON() ([]byte, error)
type Database
func (s *Database) MarshalJSON() ([]byte, error)
type DatabaseFlags
func (s *DatabaseFlags) MarshalJSON() ([]byte, error)
type DatabaseInstance
func (s *DatabaseInstance) MarshalJSON() ([]byte, error)
type DatabaseInstanceFailoverReplica
func (s *DatabaseInstanceFailoverReplica) MarshalJSON() ([]byte, error)
type DatabasesDeleteCall
func (c *DatabasesDeleteCall) Context(ctx context.Context) *DatabasesDeleteCall
func (c *DatabasesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *DatabasesDeleteCall) Fields(s ...googleapi.Field) *DatabasesDeleteCall
func (c *DatabasesDeleteCall) Header() http.Header
type DatabasesGetCall
func (c *DatabasesGetCall) Context(ctx context.Context) *DatabasesGetCall
func (c *DatabasesGetCall) Do(opts ...googleapi.CallOption) (*Database, error)
func (c *DatabasesGetCall) Fields(s ...googleapi.Field) *DatabasesGetCall
func (c *DatabasesGetCall) Header() http.Header
func (c *DatabasesGetCall) IfNoneMatch(entityTag string) *DatabasesGetCall
type DatabasesInsertCall
func (c *DatabasesInsertCall) Context(ctx context.Context) *DatabasesInsertCall
func (c *DatabasesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *DatabasesInsertCall) Fields(s ...googleapi.Field) *DatabasesInsertCall
func (c *DatabasesInsertCall) Header() http.Header
type DatabasesListCall
func (c *DatabasesListCall) Context(ctx context.Context) *DatabasesListCall
func (c *DatabasesListCall) Do(opts ...googleapi.CallOption) (*DatabasesListResponse, error)
func (c *DatabasesListCall) Fields(s ...googleapi.Field) *DatabasesListCall
func (c *DatabasesListCall) Header() http.Header
func (c *DatabasesListCall) IfNoneMatch(entityTag string) *DatabasesListCall
type DatabasesListResponse
func (s *DatabasesListResponse) MarshalJSON() ([]byte, error)
type DatabasesPatchCall
func (c *DatabasesPatchCall) Context(ctx context.Context) *DatabasesPatchCall
func (c *DatabasesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *DatabasesPatchCall) Fields(s ...googleapi.Field) *DatabasesPatchCall
func (c *DatabasesPatchCall) Header() http.Header
type DatabasesService
func NewDatabasesService(s *Service) *DatabasesService
func (r *DatabasesService) Delete(project string, instance string, database string) *DatabasesDeleteCall
func (r *DatabasesService) Get(project string, instance string, database string) *DatabasesGetCall
func (r *DatabasesService) Insert(project string, instance string, database *Database) *DatabasesInsertCall
func (r *DatabasesService) List(project string, instance string) *DatabasesListCall
func (r *DatabasesService) Patch(project string, instance string, database string, database2 *Database) *DatabasesPatchCall
func (r *DatabasesService) Update(project string, instance string, database string, database2 *Database) *DatabasesUpdateCall
type DatabasesUpdateCall
func (c *DatabasesUpdateCall) Context(ctx context.Context) *DatabasesUpdateCall
func (c *DatabasesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *DatabasesUpdateCall) Fields(s ...googleapi.Field) *DatabasesUpdateCall
func (c *DatabasesUpdateCall) Header() http.Header
type DemoteMasterConfiguration
func (s *DemoteMasterConfiguration) MarshalJSON() ([]byte, error)
type DemoteMasterContext
func (s *DemoteMasterContext) MarshalJSON() ([]byte, error)
type DemoteMasterMySqlReplicaConfiguration
func (s *DemoteMasterMySqlReplicaConfiguration) MarshalJSON() ([]byte, error)
type ExportContext
func (s *ExportContext) MarshalJSON() ([]byte, error)
type ExportContextCsvExportOptions
func (s *ExportContextCsvExportOptions) MarshalJSON() ([]byte, error)
type ExportContextSqlExportOptions
func (s *ExportContextSqlExportOptions) MarshalJSON() ([]byte, error)
type ExportContextSqlExportOptionsMysqlExportOptions
func (s *ExportContextSqlExportOptionsMysqlExportOptions) MarshalJSON() ([]byte, error)
type FailoverContext
func (s *FailoverContext) MarshalJSON() ([]byte, error)
type Flag
func (s *Flag) MarshalJSON() ([]byte, error)
type FlagsListCall
func (c *FlagsListCall) Context(ctx context.Context) *FlagsListCall
func (c *FlagsListCall) DatabaseVersion(databaseVersion string) *FlagsListCall
func (c *FlagsListCall) Do(opts ...googleapi.CallOption) (*FlagsListResponse, error)
func (c *FlagsListCall) Fields(s ...googleapi.Field) *FlagsListCall
func (c *FlagsListCall) Header() http.Header
func (c *FlagsListCall) IfNoneMatch(entityTag string) *FlagsListCall
type FlagsListResponse
func (s *FlagsListResponse) MarshalJSON() ([]byte, error)
type FlagsService
func NewFlagsService(s *Service) *FlagsService
func (r *FlagsService) List() *FlagsListCall
type ImportContext
func (s *ImportContext) MarshalJSON() ([]byte, error)
type ImportContextCsvImportOptions
func (s *ImportContextCsvImportOptions) MarshalJSON() ([]byte, error)
type InstancesAddServerCaCall
func (c *InstancesAddServerCaCall) Context(ctx context.Context) *InstancesAddServerCaCall
func (c *InstancesAddServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesAddServerCaCall) Fields(s ...googleapi.Field) *InstancesAddServerCaCall
func (c *InstancesAddServerCaCall) Header() http.Header
type InstancesCloneCall
func (c *InstancesCloneCall) Context(ctx context.Context) *InstancesCloneCall
func (c *InstancesCloneCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesCloneCall) Fields(s ...googleapi.Field) *InstancesCloneCall
func (c *InstancesCloneCall) Header() http.Header
type InstancesCloneRequest
func (s *InstancesCloneRequest) MarshalJSON() ([]byte, error)
type InstancesDeleteCall
func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall
func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall
func (c *InstancesDeleteCall) Header() http.Header
type InstancesDemoteMasterCall
func (c *InstancesDemoteMasterCall) Context(ctx context.Context) *InstancesDemoteMasterCall
func (c *InstancesDemoteMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesDemoteMasterCall) Fields(s ...googleapi.Field) *InstancesDemoteMasterCall
func (c *InstancesDemoteMasterCall) Header() http.Header
type InstancesDemoteMasterRequest
func (s *InstancesDemoteMasterRequest) MarshalJSON() ([]byte, error)
type InstancesExportCall
func (c *InstancesExportCall) Context(ctx context.Context) *InstancesExportCall
func (c *InstancesExportCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesExportCall) Fields(s ...googleapi.Field) *InstancesExportCall
func (c *InstancesExportCall) Header() http.Header
type InstancesExportRequest
func (s *InstancesExportRequest) MarshalJSON() ([]byte, error)
type InstancesFailoverCall
func (c *InstancesFailoverCall) Context(ctx context.Context) *InstancesFailoverCall
func (c *InstancesFailoverCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesFailoverCall) Fields(s ...googleapi.Field) *InstancesFailoverCall
func (c *InstancesFailoverCall) Header() http.Header
type InstancesFailoverRequest
func (s *InstancesFailoverRequest) MarshalJSON() ([]byte, error)
type InstancesGetCall
func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall
func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*DatabaseInstance, error)
func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall
func (c *InstancesGetCall) Header() http.Header
func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall
type InstancesImportCall
func (c *InstancesImportCall) Context(ctx context.Context) *InstancesImportCall
func (c *InstancesImportCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesImportCall) Fields(s ...googleapi.Field) *InstancesImportCall
func (c *InstancesImportCall) Header() http.Header
type InstancesImportRequest
func (s *InstancesImportRequest) MarshalJSON() ([]byte, error)
type InstancesInsertCall
func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall
func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall
func (c *InstancesInsertCall) Header() http.Header
type InstancesListCall
func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall
func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResponse, error)
func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall
func (c *InstancesListCall) Filter(filter string) *InstancesListCall
func (c *InstancesListCall) Header() http.Header
func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall
func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall
func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall
func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstancesListResponse) error) error
type InstancesListResponse
func (s *InstancesListResponse) MarshalJSON() ([]byte, error)
type InstancesListServerCasCall
func (c *InstancesListServerCasCall) Context(ctx context.Context) *InstancesListServerCasCall
func (c *InstancesListServerCasCall) Do(opts ...googleapi.CallOption) (*InstancesListServerCasResponse, error)
func (c *InstancesListServerCasCall) Fields(s ...googleapi.Field) *InstancesListServerCasCall
func (c *InstancesListServerCasCall) Header() http.Header
func (c *InstancesListServerCasCall) IfNoneMatch(entityTag string) *InstancesListServerCasCall
type InstancesListServerCasResponse
func (s *InstancesListServerCasResponse) MarshalJSON() ([]byte, error)
type InstancesPatchCall
func (c *InstancesPatchCall) Context(ctx context.Context) *InstancesPatchCall
func (c *InstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesPatchCall) Fields(s ...googleapi.Field) *InstancesPatchCall
func (c *InstancesPatchCall) Header() http.Header
type InstancesPromoteReplicaCall
func (c *InstancesPromoteReplicaCall) Context(ctx context.Context) *InstancesPromoteReplicaCall
func (c *InstancesPromoteReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesPromoteReplicaCall) Fields(s ...googleapi.Field) *InstancesPromoteReplicaCall
func (c *InstancesPromoteReplicaCall) Header() http.Header
type InstancesResetSslConfigCall
func (c *InstancesResetSslConfigCall) Context(ctx context.Context) *InstancesResetSslConfigCall
func (c *InstancesResetSslConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesResetSslConfigCall) Fields(s ...googleapi.Field) *InstancesResetSslConfigCall
func (c *InstancesResetSslConfigCall) Header() http.Header
type InstancesRestartCall
func (c *InstancesRestartCall) Context(ctx context.Context) *InstancesRestartCall
func (c *InstancesRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesRestartCall) Fields(s ...googleapi.Field) *InstancesRestartCall
func (c *InstancesRestartCall) Header() http.Header
type InstancesRestoreBackupCall
func (c *InstancesRestoreBackupCall) Context(ctx context.Context) *InstancesRestoreBackupCall
func (c *InstancesRestoreBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesRestoreBackupCall) Fields(s ...googleapi.Field) *InstancesRestoreBackupCall
func (c *InstancesRestoreBackupCall) Header() http.Header
type InstancesRestoreBackupRequest
func (s *InstancesRestoreBackupRequest) MarshalJSON() ([]byte, error)
type InstancesRotateServerCaCall
func (c *InstancesRotateServerCaCall) Context(ctx context.Context) *InstancesRotateServerCaCall
func (c *InstancesRotateServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesRotateServerCaCall) Fields(s ...googleapi.Field) *InstancesRotateServerCaCall
func (c *InstancesRotateServerCaCall) Header() http.Header
type InstancesRotateServerCaRequest
func (s *InstancesRotateServerCaRequest) MarshalJSON() ([]byte, error)
type InstancesService
func NewInstancesService(s *Service) *InstancesService
func (r *InstancesService) AddServerCa(project string, instance string) *InstancesAddServerCaCall
func (r *InstancesService) Clone(project string, instance string, instancesclonerequest *InstancesCloneRequest) *InstancesCloneCall
func (r *InstancesService) Delete(project string, instance string) *InstancesDeleteCall
func (r *InstancesService) DemoteMaster(project string, instance string, instancesdemotemasterrequest *InstancesDemoteMasterRequest) *InstancesDemoteMasterCall
func (r *InstancesService) Export(project string, instance string, instancesexportrequest *InstancesExportRequest) *InstancesExportCall
func (r *InstancesService) Failover(project string, instance string, instancesfailoverrequest *InstancesFailoverRequest) *InstancesFailoverCall
func (r *InstancesService) Get(project string, instance string) *InstancesGetCall
func (r *InstancesService) Import(project string, instance string, instancesimportrequest *InstancesImportRequest) *InstancesImportCall
func (r *InstancesService) Insert(project string, databaseinstance *DatabaseInstance) *InstancesInsertCall
func (r *InstancesService) List(project string) *InstancesListCall
func (r *InstancesService) ListServerCas(project string, instance string) *InstancesListServerCasCall
func (r *InstancesService) Patch(project string, instance string, databaseinstance *DatabaseInstance) *InstancesPatchCall
func (r *InstancesService) PromoteReplica(project string, instance string) *InstancesPromoteReplicaCall
func (r *InstancesService) ResetSslConfig(project string, instance string) *InstancesResetSslConfigCall
func (r *InstancesService) Restart(project string, instance string) *InstancesRestartCall
func (r *InstancesService) RestoreBackup(project string, instance string, instancesrestorebackuprequest *InstancesRestoreBackupRequest) *InstancesRestoreBackupCall
func (r *InstancesService) RotateServerCa(project string, instance string, instancesrotateservercarequest *InstancesRotateServerCaRequest) *InstancesRotateServerCaCall
func (r *InstancesService) StartReplica(project string, instance string) *InstancesStartReplicaCall
func (r *InstancesService) StopReplica(project string, instance string) *InstancesStopReplicaCall
func (r *InstancesService) TruncateLog(project string, instance string, instancestruncatelogrequest *InstancesTruncateLogRequest) *InstancesTruncateLogCall
func (r *InstancesService) Update(project string, instance string, databaseinstance *DatabaseInstance) *InstancesUpdateCall
type InstancesStartReplicaCall
func (c *InstancesStartReplicaCall) Context(ctx context.Context) *InstancesStartReplicaCall
func (c *InstancesStartReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesStartReplicaCall) Fields(s ...googleapi.Field) *InstancesStartReplicaCall
func (c *InstancesStartReplicaCall) Header() http.Header
type InstancesStopReplicaCall
func (c *InstancesStopReplicaCall) Context(ctx context.Context) *InstancesStopReplicaCall
func (c *InstancesStopReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesStopReplicaCall) Fields(s ...googleapi.Field) *InstancesStopReplicaCall
func (c *InstancesStopReplicaCall) Header() http.Header
type InstancesTruncateLogCall
func (c *InstancesTruncateLogCall) Context(ctx context.Context) *InstancesTruncateLogCall
func (c *InstancesTruncateLogCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesTruncateLogCall) Fields(s ...googleapi.Field) *InstancesTruncateLogCall
func (c *InstancesTruncateLogCall) Header() http.Header
type InstancesTruncateLogRequest
func (s *InstancesTruncateLogRequest) MarshalJSON() ([]byte, error)
type InstancesUpdateCall
func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall
func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall
func (c *InstancesUpdateCall) Header() http.Header
type IpConfiguration
func (s *IpConfiguration) MarshalJSON() ([]byte, error)
type IpMapping
func (s *IpMapping) MarshalJSON() ([]byte, error)
type LocationPreference
func (s *LocationPreference) MarshalJSON() ([]byte, error)
type MaintenanceWindow
func (s *MaintenanceWindow) MarshalJSON() ([]byte, error)
type MySqlReplicaConfiguration
func (s *MySqlReplicaConfiguration) MarshalJSON() ([]byte, error)
type OnPremisesConfiguration
func (s *OnPremisesConfiguration) MarshalJSON() ([]byte, error)
type Operation
func (s *Operation) MarshalJSON() ([]byte, error)
type OperationError
func (s *OperationError) MarshalJSON() ([]byte, error)
type OperationErrors
func (s *OperationErrors) MarshalJSON() ([]byte, error)
type OperationsGetCall
func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall
func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall
func (c *OperationsGetCall) Header() http.Header
func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall
type OperationsListCall
func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall
func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error)
func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall
func (c *OperationsListCall) Header() http.Header
func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall
func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall
func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall
func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error
type OperationsListResponse
func (s *OperationsListResponse) MarshalJSON() ([]byte, error)
type OperationsService
func NewOperationsService(s *Service) *OperationsService
func (r *OperationsService) Get(project string, operation string) *OperationsGetCall
func (r *OperationsService) List(project string, instance string) *OperationsListCall
type ReplicaConfiguration
func (s *ReplicaConfiguration) MarshalJSON() ([]byte, error)
type RestoreBackupContext
func (s *RestoreBackupContext) MarshalJSON() ([]byte, error)
type RotateServerCaContext
func (s *RotateServerCaContext) MarshalJSON() ([]byte, error)
type Service
func New(client *http.Client) (*Service, error)
type Settings
func (s *Settings) MarshalJSON() ([]byte, error)
type SslCert
func (s *SslCert) MarshalJSON() ([]byte, error)
type SslCertDetail
func (s *SslCertDetail) MarshalJSON() ([]byte, error)
type SslCertsCreateEphemeralCall
func (c *SslCertsCreateEphemeralCall) Context(ctx context.Context) *SslCertsCreateEphemeralCall
func (c *SslCertsCreateEphemeralCall) Do(opts ...googleapi.CallOption) (*SslCert, error)
func (c *SslCertsCreateEphemeralCall) Fields(s ...googleapi.Field) *SslCertsCreateEphemeralCall
func (c *SslCertsCreateEphemeralCall) Header() http.Header
type SslCertsCreateEphemeralRequest
func (s *SslCertsCreateEphemeralRequest) MarshalJSON() ([]byte, error)
type SslCertsDeleteCall
func (c *SslCertsDeleteCall) Context(ctx context.Context) *SslCertsDeleteCall
func (c *SslCertsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *SslCertsDeleteCall) Fields(s ...googleapi.Field) *SslCertsDeleteCall
func (c *SslCertsDeleteCall) Header() http.Header
type SslCertsGetCall
func (c *SslCertsGetCall) Context(ctx context.Context) *SslCertsGetCall
func (c *SslCertsGetCall) Do(opts ...googleapi.CallOption) (*SslCert, error)
func (c *SslCertsGetCall) Fields(s ...googleapi.Field) *SslCertsGetCall
func (c *SslCertsGetCall) Header() http.Header
func (c *SslCertsGetCall) IfNoneMatch(entityTag string) *SslCertsGetCall
type SslCertsInsertCall
func (c *SslCertsInsertCall) Context(ctx context.Context) *SslCertsInsertCall
func (c *SslCertsInsertCall) Do(opts ...googleapi.CallOption) (*SslCertsInsertResponse, error)
func (c *SslCertsInsertCall) Fields(s ...googleapi.Field) *SslCertsInsertCall
func (c *SslCertsInsertCall) Header() http.Header
type SslCertsInsertRequest
func (s *SslCertsInsertRequest) MarshalJSON() ([]byte, error)
type SslCertsInsertResponse
func (s *SslCertsInsertResponse) MarshalJSON() ([]byte, error)
type SslCertsListCall
func (c *SslCertsListCall) Context(ctx context.Context) *SslCertsListCall
func (c *SslCertsListCall) Do(opts ...googleapi.CallOption) (*SslCertsListResponse, error)
func (c *SslCertsListCall) Fields(s ...googleapi.Field) *SslCertsListCall
func (c *SslCertsListCall) Header() http.Header
func (c *SslCertsListCall) IfNoneMatch(entityTag string) *SslCertsListCall
type SslCertsListResponse
func (s *SslCertsListResponse) MarshalJSON() ([]byte, error)
type SslCertsService
func NewSslCertsService(s *Service) *SslCertsService
func (r *SslCertsService) CreateEphemeral(project string, instance string, sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest) *SslCertsCreateEphemeralCall
func (r *SslCertsService) Delete(project string, instance string, sha1Fingerprint string) *SslCertsDeleteCall
func (r *SslCertsService) Get(project string, instance string, sha1Fingerprint string) *SslCertsGetCall
func (r *SslCertsService) Insert(project string, instance string, sslcertsinsertrequest *SslCertsInsertRequest) *SslCertsInsertCall
func (r *SslCertsService) List(project string, instance string) *SslCertsListCall
type Tier
func (s *Tier) MarshalJSON() ([]byte, error)
type TiersListCall
func (c *TiersListCall) Context(ctx context.Context) *TiersListCall
func (c *TiersListCall) Do(opts ...googleapi.CallOption) (*TiersListResponse, error)
func (c *TiersListCall) Fields(s ...googleapi.Field) *TiersListCall
func (c *TiersListCall) Header() http.Header
func (c *TiersListCall) IfNoneMatch(entityTag string) *TiersListCall
type TiersListResponse
func (s *TiersListResponse) MarshalJSON() ([]byte, error)
type TiersService
func NewTiersService(s *Service) *TiersService
func (r *TiersService) List(project string) *TiersListCall
type TruncateLogContext
func (s *TruncateLogContext) MarshalJSON() ([]byte, error)
type User
func (s *User) MarshalJSON() ([]byte, error)
type UsersDeleteCall
func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall
func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall
func (c *UsersDeleteCall) Header() http.Header
type UsersInsertCall
func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall
func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall
func (c *UsersInsertCall) Header() http.Header
type UsersListCall
func (c *UsersListCall) Context(ctx context.Context) *UsersListCall
func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*UsersListResponse, error)
func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall
func (c *UsersListCall) Header() http.Header
func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall
type UsersListResponse
func (s *UsersListResponse) MarshalJSON() ([]byte, error)
type UsersService
func NewUsersService(s *Service) *UsersService
func (r *UsersService) Delete(project string, instance string, host string, name string) *UsersDeleteCall
func (r *UsersService) Insert(project string, instance string, user *User) *UsersInsertCall
func (r *UsersService) List(project string, instance string) *UsersListCall
func (r *UsersService) Update(project string, instance string, name string, user *User) *UsersUpdateCall
type UsersUpdateCall
func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall
func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error)
func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall
func (c *UsersUpdateCall) Header() http.Header
func (c *UsersUpdateCall) Host(host string) *UsersUpdateCall
关于用于谷歌云 SQL 的 GoLang SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55106146/
大约一年前,我决定确保每个包含非唯一文本的Flash通知都将从模块中的方法中获取文本。我这样做的最初原因是为了避免一遍又一遍地输入相同的字符串。如果我想更改措辞,我可以在一个地方轻松完成,而且一遍又一遍地重复同一件事而出现拼写错误的可能性也会降低。我最终得到的是这样的:moduleMessagesdefformat_error_messages(errors)errors.map{|attribute,message|"Error:#{attribute.to_s.titleize}#{message}."}enddeferror_message_could_not_find(obje
我已经在Sinatra上创建了应用程序,它代表了一个简单的API。我想在生产和开发上进行部署。我想在部署时选择,是开发还是生产,一些方法的逻辑应该改变,这取决于部署类型。是否有任何想法,如何完成以及解决此问题的一些示例。例子:我有代码get'/api/test'doreturn"Itisdev"end但是在部署到生产环境之后我想在运行/api/test之后看到ItisPROD如何实现? 最佳答案 根据SinatraDocumentation:EnvironmentscanbesetthroughtheRACK_ENVenvironm
当我使用has_one时,它工作得很好,但在has_many上却不行。在这里您可以看到object_id不同,因为它运行了另一个SQL来再次获取它。ruby-1.9.2-p290:001>e=Employee.create(name:'rafael',active:false)ruby-1.9.2-p290:002>b=Badge.create(number:1,employee:e)ruby-1.9.2-p290:003>a=Address.create(street:"123MarketSt",city:"SanDiego",employee:e)ruby-1.9.2-p290
目录第1题连续问题分析:解法:第2题分组问题分析:解法:第3题间隔连续问题分析:解法:第4题打折日期交叉问题分析:解法:第5题同时在线问题分析:解法:第1题连续问题如下数据为蚂蚁森林中用户领取的减少碳排放量iddtlowcarbon10012021-12-1212310022021-12-124510012021-12-134310012021-12-134510012021-12-132310022021-12-144510012021-12-1423010022021-12-154510012021-12-1523.......找出连续3天及以上减少碳排放量在100以上的用户分析:遇到这类
我正在尝试查询我的Rails数据库(Postgres)中的购买表,我想查询时间范围。例如,我想知道在所有日期的下午2点到3点之间进行了多少次购买。此表中有一个created_at列,但我不知道如何在不搜索特定日期的情况下完成此操作。我试过:Purchases.where("created_atBETWEEN?and?",Time.now-1.hour,Time.now)但这最终只会搜索今天与那些时间的日期。 最佳答案 您需要使用PostgreSQL'sdate_part/extractfunction从created_at中提取小时
我正在使用带有Rails的Devise,我想添加一个方法“getAllComments”,所以我这样写:classUser在我的Controller中:defdashboard@user=current_user@comments=@user.getAllComments();end当我访问我的url时,我得到了undefinedmethod`getAllComments'for#我做错了什么?谢谢 最佳答案 因为getAllComments是一个类方法,而您正试图将其作为实例方法访问。您要么需要访问它:User.getAllCom
我正在使用Rails3.2.3和Ruby1.9.3p0。我发现我经常需要确定某个字符串是否出现在选项列表中。看来我可以使用Ruby数组.includemethod:或正则表达式equals-tildematchshorthand用竖线分隔选项:就性能而言,一个比另一个好吗?还有更好的方法吗? 最佳答案 总结:Array#include?包含String元素,在接受和拒绝输入时均胜出,对于您的示例只有三个可接受的值。对于要检查的更大的集合,看起来Set#include?和String元素可能会获胜。如何测试我们应该根据经验对此进行测试
我找到了这样的东西:Rails:Howtolistdatabasetables/objectsusingtheRailsconsole?这一行没问题:ActiveRecord::Base.connection.tables并返回所有表但是ActiveRecord::Base.connection.table_structure("users")产生错误:ActiveRecord::Base.connection.table_structure("projects")我认为table_structure不是Postgres方法。如何列出Postgres数据库的Rails控制台中表中的所有
Ruby初学者努力简单地将这个@@people散列的值打印到控制台classPerson#haveafirst_nameandlast_nameattributewithpublicaccessorsattr_accessor:first_nameattr_accessor:last_name#haveaclassattributecalled`people`thatholdsanarrayofobjects@@people=[]#havean`initialize`methodtoinitializeeachinstancedefinitialize(first_name,last_
这个问题在这里已经有了答案:关闭10年前。PossibleDuplicate:AmazonAPIlibraryforPython?我正在寻找一个AmazonAPI,它可以让我:按书名或作者查找书籍显示书籍封面获取有关每本书的信息(价格、评级、评论数、格式、页数等)Python或Ruby库都可以(我只想要最容易使用的库)。有什么建议么?我知道在SO上还有其他一些关于此的帖子,但这些API似乎很快就过时了。[几个月前我尝试了几个建议的Ruby库,但无法让它们中的任何一个工作。]