Documentation ¶
Index ¶
- Constants
- func Contains[T comparable](ts []T, val T) bool
- func ParsePrivateKey(key []byte) (any, error)
- func ReadPrivateKey(path string) (any, error)
- type AccountRole
- type AccountRoleGrantee
- type Client
- func (c *Client) GetAccountRole(ctx context.Context, roleName string) (*AccountRole, *http.Response, error)
- func (c *Client) GetDatabase(ctx context.Context, name string) (*Database, *http.Response, error)
- func (c *Client) GetStatementResponse(ctx context.Context, statementHandle string) (*http.Request, error)
- func (c *Client) GetUser(ctx context.Context, username string) (*User, *http.Response, error)
- func (c *Client) GrantAccountRole(ctx context.Context, roleName, userName string) (*http.Response, error)
- func (c *Client) ListAccountRoleGrantees(ctx context.Context, roleName string, offset, limit int) ([]AccountRoleGrantee, *http.Response, error)
- func (c *Client) ListAccountRoles(ctx context.Context, offset, limit int) ([]AccountRole, *http.Response, error)
- func (c *Client) ListDatabases(ctx context.Context, offset, limit int) ([]Database, *http.Response, error)
- func (c *Client) ListUsers(ctx context.Context, offset, limit int) ([]User, *http.Response, error)
- func (c *Client) PostStatementRequest(ctx context.Context, queries []string) (*http.Request, error)
- func (c *Client) RevokeAccountRole(ctx context.Context, roleName, userName string) (*http.Response, error)
- type Database
- type GetUserRawResponse
- type GrantAccountRoleResponse
- type JWTConfig
- type ListAccountRoleGranteesRawResponse
- type ListAccountRolesRawResponse
- type ListDatabasesRawResponse
- type ListUsersRawResponse
- type Parsable
- type QueryParameter
- type ResultSetMetadata
- func (m *ResultSetMetadata) FindRowTypeByName(name string) (bool, int, *RowType)
- func (m *ResultSetMetadata) GetBoolValueFromRow(row []string, key string) (bool, error)
- func (m *ResultSetMetadata) GetStringValueFromRow(row []string, key string) (string, error)
- func (m *ResultSetMetadata) GetTimeValueFromRow(row []string, key string) (time.Time, error)
- func (m *ResultSetMetadata) ParseRow(s Parsable, row []string) error
- type RowType
- type StatementsApiRequestBody
- type StatementsApiResponseBase
- type StatementsRequestParameters
- type User
Constants ¶
View Source
const ( AuthTypeHeaderKey = "X-Snowflake-Authorization-Token-Type" AuthTypeHeaderValue = "KEYPAIR_JWT" )
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](ts []T, val T) bool
func ParsePrivateKey ¶ added in v0.0.6
func ReadPrivateKey ¶
Types ¶
type AccountRole ¶
type AccountRole struct {
Name string
}
func (*AccountRole) GetColumnName ¶
func (ar *AccountRole) GetColumnName(fieldName string) string
type AccountRoleGrantee ¶
type Client ¶
func (*Client) GetAccountRole ¶
func (*Client) GetDatabase ¶
func (*Client) GetStatementResponse ¶
func (*Client) GrantAccountRole ¶
func (*Client) ListAccountRoleGrantees ¶
func (*Client) ListAccountRoles ¶
func (*Client) ListDatabases ¶
func (*Client) PostStatementRequest ¶
type Database ¶
func (*Database) GetColumnName ¶
type GetUserRawResponse ¶
type GetUserRawResponse struct { StatementsApiResponseBase Data [][]string `json:"data"` }
func (*GetUserRawResponse) GetUser ¶
func (r *GetUserRawResponse) GetUser() (*User, error)
func (*GetUserRawResponse) GetValueByColumnName ¶
func (r *GetUserRawResponse) GetValueByColumnName(columnName string) (string, bool)
type GrantAccountRoleResponse ¶
type GrantAccountRoleResponse struct {
StatementsApiResponseBase
}
type JWTConfig ¶
type JWTConfig struct { AccountIdentifier string UserIdentifier string PrivateKeyValue any // contains filtered or unexported fields }
func (*JWTConfig) GenerateBearerToken ¶
type ListAccountRoleGranteesRawResponse ¶
type ListAccountRoleGranteesRawResponse struct { StatementsApiResponseBase Data [][]string `json:"data"` }
func (*ListAccountRoleGranteesRawResponse) GetAccountRoleGrantees ¶
func (r *ListAccountRoleGranteesRawResponse) GetAccountRoleGrantees() []AccountRoleGrantee
type ListAccountRolesRawResponse ¶
type ListAccountRolesRawResponse struct {
StatementsApiResponseBase
}
func (*ListAccountRolesRawResponse) GetAccountRoles ¶
func (r *ListAccountRolesRawResponse) GetAccountRoles() ([]AccountRole, error)
type ListDatabasesRawResponse ¶
type ListDatabasesRawResponse struct {
StatementsApiResponseBase
}
func (*ListDatabasesRawResponse) GetDatabases ¶
func (r *ListDatabasesRawResponse) GetDatabases() ([]Database, error)
type ListUsersRawResponse ¶
type ListUsersRawResponse struct {
StatementsApiResponseBase
}
func (*ListUsersRawResponse) GetUsers ¶
func (r *ListUsersRawResponse) GetUsers() ([]User, error)
type QueryParameter ¶
type ResultSetMetadata ¶
func (*ResultSetMetadata) FindRowTypeByName ¶
func (m *ResultSetMetadata) FindRowTypeByName(name string) (bool, int, *RowType)
func (*ResultSetMetadata) GetBoolValueFromRow ¶
func (m *ResultSetMetadata) GetBoolValueFromRow(row []string, key string) (bool, error)
func (*ResultSetMetadata) GetStringValueFromRow ¶
func (m *ResultSetMetadata) GetStringValueFromRow(row []string, key string) (string, error)
func (*ResultSetMetadata) GetTimeValueFromRow ¶ added in v0.0.7
type StatementsApiRequestBody ¶
type StatementsApiRequestBody struct { Statement string `json:"statement"` Parameters StatementsRequestParameters `json:"parameters"` }
type StatementsRequestParameters ¶
type StatementsRequestParameters struct {
StatementsCount int `json:"MULTI_STATEMENT_COUNT"`
}
type User ¶
type User struct { Username string Login string DisplayName string FirstName string LastName string Email string Disabled bool Locked bool DefaultRole string HasRSAPublicKey bool HasPassword bool LastSuccessLogin time.Time Type string HasMfa bool Comment string }
func (*User) GetColumnName ¶
Click to show internal directories.
Click to hide internal directories.