Documentation
¶
Index ¶
- Constants
- Variables
- func ParseRFC1123Date(s string) (time.Time, error)
- func QuoteRef(ref string) string
- func QuoteString(str string) string
- func StringToBool(s string) bool
- type GMTTime
- type Properties
- type Property
- type ResourceBuilder
- func (rb *ResourceBuilder) Auth() string
- func (rb *ResourceBuilder) Authorization() string
- func (rb *ResourceBuilder) AuthorizationId(instanceId string) string
- func (rb *ResourceBuilder) CachedInstances() string
- func (rb *ResourceBuilder) Function(functionName string) string
- func (rb *ResourceBuilder) Functions() string
- func (rb *ResourceBuilder) Instance(instanceId string) string
- func (rb *ResourceBuilder) Instances() string
- func (rb *ResourceBuilder) Project() string
- func (rb *ResourceBuilder) Projects() string
- func (rb *ResourceBuilder) Resource(resourceName string) string
- func (rb *ResourceBuilder) Resources() string
- func (rb *ResourceBuilder) Role(roleName string) string
- func (rb *ResourceBuilder) Roles() string
- func (rb *ResourceBuilder) Schema(schemaName string) string
- func (rb *ResourceBuilder) Schemas() string
- func (rb *ResourceBuilder) SetProject(name string)
- func (rb *ResourceBuilder) Table(schemaName, tableName string) string
- func (rb *ResourceBuilder) Tables() string
- func (rb *ResourceBuilder) Tunnel() string
- func (rb *ResourceBuilder) User(userId string) string
- func (rb *ResourceBuilder) Users() string
- func (rb *ResourceBuilder) Volume(volumeName string) string
- func (rb *ResourceBuilder) VolumePartition(volumeName, partitionKey string) string
- func (rb *ResourceBuilder) Volumes() string
- func (rb *ResourceBuilder) XFlow(xFlowName string) string
- func (rb *ResourceBuilder) XFlows() string
- type Result
Constants ¶
const ( UserAgentValue = "odps-go-sdk/0.0.1 Go/1.17.2" HttpHeaderOdpsPrefix = "x-odps-" )
const ( HttpHeaderDate = "Date" HttpHeaderContentType = "Content-Type" HttpHeaderContentMD5 = "Content-MD5" HttpHeaderContentDisposition = "Content-Disposition" HttpHeaderContentLength = "Content-Length" HttpHeaderContentEncoding = "Content-Encoding" HttpHeaderLastModified = "Last-Modified" HttpHeaderUserAgent = "User-Agent" HttpHeaderXOdpsUserAgent = "x-odps-user-agent" HttpHeaderOdpsOwner = "x-odps-owner" HttpHeaderOdpsCreationTime = "x-odps-creation-time" HttpHeaderOdpsRequestId = "x-odps-request-id" HttpHeaderLocation = "Location" HttpHeaderOdpsStartTime = "x-odps-start-time" HttpHeaderOdpsEndTime = "x-odps-end-time" HttpHeaderSqlTimezone = "x-odps-sql-timezone" HttpHeaderOdpsSupervisionToken = "odps-x-supervision-token" HttpHeaderAuthorization = "Authorization" HttpHeaderAuthorizationSTSToken = "authorization-sts-token" HttpHeaderAppAuthentication = "application-authentication" HttpHeaderSTSAuthentication = "sts-authentication" HttpHeaderSTSToken = "sts-token" HttpHeaderODPSBearerToken = "x-odps-bearer-token" HttpHeaderOdpsDateTransFrom = "odps-tunnel-date-transform" HttpHeaderOdpsTunnelVersion = "x-odps-tunnel-version" HttpHeaderOdpsSlotNum = "odps-tunnel-slot-num" HttpHeaderRoutedServer = "odps-tunnel-routed-server" HttpHeaderTransferEncoding = "Transfer-Encoding" HttpHeaderAcceptEncoding = "Accept-Encoding" HttpHeaderOdpsSdkSupportSchemaEvolution = "odps-tunnel-sdk-support-schema-evolution" HttpHeaderOdpsTunnelLatestSchemaVersion = "odps-tunnel-latest-schema-version" HttpHeaderOdpsSchemaName = "schema-name" HttpHeaderOdpsResourceName = "x-odps-resource-name" HttpHeaderOdpsResourceType = "x-odps-resource-type" HttpHeaderOdpsResourceSize = "x-odps-resource-size" HttpHeaderOdpsComment = "x-odps-comment" HttpHeaderOdpsUpdator = "x-odps-updator" HttpHeaderOdpsCopyTableSource = "x-odps-copy-table-source" HttpHeaderOdpsCopyFileSource = "x-odps-copy-file-source" HttpHeaderOdpsResourceIsTemp = "x-odps-resource-istemp" HttpHeaderOdpsResourceMergeTotalBytes = "x-odps-resource-merge-total-bytes" XMLContentType = "application/xml" )
const ( ProjectsPath = "/projects" SchemasPath = "/schemas" TablesPath = "/tables" RegistrationPath = "/registration" FunctionsPath = "/functions" EventsPath = "/events" ResourcesPath = "/resources" InstancesPath = "/instances" CachedInstancesPath = "/cachedinstances" VolumesPath = "/volumes" StreamsPath = "/streams" TopologiesPath = "/topologies" XFlowsPath = "/xflows" StreamJobsPath = "/streamjobs" ServersPath = "/servers" MatricesPath = "/matrices" OfflineModelsPath = "/offlinemodels" UsersPath = "/users" RolesPath = "/roles" SessionsPath = "/session" AuthPath = "/auth" AuthorizationPath = "/authorization" TunnelPath = "/tunnel" )
Variables ¶
var GMT, _ = time.LoadLocation("GMT")
var HttpMethod = struct { GetMethod string PutMethod string PostMethod string DeleteMethod string }{ GetMethod: "GET", PutMethod: "PUT", PostMethod: "POST", DeleteMethod: "DELETE", }
Functions ¶
func QuoteString ¶ added in v0.3.14
func StringToBool ¶ added in v0.4.0
StringToBool 将字符串转换为布尔值,不合法时返回 false
Types ¶
type GMTTime ¶
func (*GMTTime) MarshalJSON ¶
func (*GMTTime) UnmarshalJSON ¶
func (*GMTTime) UnmarshalXML ¶
type Properties ¶
type Properties []Property
Properties just alias to []Property
func (Properties) Get ¶
func (ps Properties) Get(key string) string
type ResourceBuilder ¶
type ResourceBuilder struct {
ProjectName string
}
ResourceBuilder is a helper to build resource path
func NewResourceBuilder ¶
func NewResourceBuilder(projectName string) ResourceBuilder
NewResourceBuilder creates a new ResourceBuilder
func (*ResourceBuilder) Auth ¶
func (rb *ResourceBuilder) Auth() string
Auth returns the auth resource path
func (*ResourceBuilder) Authorization ¶
func (rb *ResourceBuilder) Authorization() string
Authorization returns the authorization resource path
func (*ResourceBuilder) AuthorizationId ¶
func (rb *ResourceBuilder) AuthorizationId(instanceId string) string
AuthorizationId returns the authorization resource path with instance id
func (*ResourceBuilder) CachedInstances ¶
func (rb *ResourceBuilder) CachedInstances() string
CachedInstances returns the cached instances resource path
func (*ResourceBuilder) Function ¶
func (rb *ResourceBuilder) Function(functionName string) string
Function returns the function resource path
func (*ResourceBuilder) Functions ¶
func (rb *ResourceBuilder) Functions() string
Functions returns the functions resource path
func (*ResourceBuilder) Instance ¶
func (rb *ResourceBuilder) Instance(instanceId string) string
Instance returns the instance resource path
func (*ResourceBuilder) Instances ¶
func (rb *ResourceBuilder) Instances() string
Instances returns the instances resource path
func (*ResourceBuilder) Project ¶
func (rb *ResourceBuilder) Project() string
Project returns the project resource path
func (*ResourceBuilder) Projects ¶
func (rb *ResourceBuilder) Projects() string
Projects returns the projects resource path
func (*ResourceBuilder) Resource ¶
func (rb *ResourceBuilder) Resource(resourceName string) string
Resource returns the resource resource path
func (*ResourceBuilder) Resources ¶
func (rb *ResourceBuilder) Resources() string
Resources returns the resources resource path
func (*ResourceBuilder) Role ¶
func (rb *ResourceBuilder) Role(roleName string) string
Role returns the role resource path
func (*ResourceBuilder) Roles ¶
func (rb *ResourceBuilder) Roles() string
Roles returns the roles resource path
func (*ResourceBuilder) Schema ¶ added in v0.3.8
func (rb *ResourceBuilder) Schema(schemaName string) string
Schema returns the schema resource path
func (*ResourceBuilder) Schemas ¶ added in v0.3.8
func (rb *ResourceBuilder) Schemas() string
Schemas returns the schemas resource path
func (*ResourceBuilder) SetProject ¶
func (rb *ResourceBuilder) SetProject(name string)
SetProject sets the project name
func (*ResourceBuilder) Table ¶
func (rb *ResourceBuilder) Table(schemaName, tableName string) string
Table returns the table resource path
func (*ResourceBuilder) Tables ¶
func (rb *ResourceBuilder) Tables() string
Tables returns the tables resource path
func (*ResourceBuilder) Tunnel ¶
func (rb *ResourceBuilder) Tunnel() string
Tunnel returns the tunnel resource path
func (*ResourceBuilder) User ¶
func (rb *ResourceBuilder) User(userId string) string
User returns the user resource path
func (*ResourceBuilder) Users ¶
func (rb *ResourceBuilder) Users() string
Users returns the users resource path
func (*ResourceBuilder) Volume ¶
func (rb *ResourceBuilder) Volume(volumeName string) string
Volume returns the volume resource path
func (*ResourceBuilder) VolumePartition ¶
func (rb *ResourceBuilder) VolumePartition(volumeName, partitionKey string) string
VolumePartition returns the volume partition resource path
func (*ResourceBuilder) Volumes ¶
func (rb *ResourceBuilder) Volumes() string
Volumes returns the volumes resource path
func (*ResourceBuilder) XFlow ¶
func (rb *ResourceBuilder) XFlow(xFlowName string) string
XFlow returns the xflow resource path
func (*ResourceBuilder) XFlows ¶
func (rb *ResourceBuilder) XFlows() string
XFlows returns the xflows resource path