Documentation
¶
Index ¶
- Constants
- type Jcosmos
- func (c Jcosmos) CreateDatabase(db newDatabaseRequest, obj any) error
- func (c Jcosmos) CreateDatabaseWithAutopilot(db newDatabaseRequest, max int, obj any) error
- func (c Jcosmos) CreateDatabaseWithThroughput(db newDatabaseRequest, throughput int, obj any) error
- func (c Jcosmos) CreateDocument(pk []string, upsert bool, obj any) error
- func (c Jcosmos) CreateTrigger(t Trigger, obj TriggerResponse) error
- func (c Jcosmos) CreateUser(user newUserRequest, obj UserResponse) error
- func (c Jcosmos) DeleteDatabase(db newDatabaseRequest, resp databaseResponse) error
- func (c Jcosmos) DeleteDocument(id string, pk []string) error
- func (c Jcosmos) DeleteTrigger(id string) error
- func (c Jcosmos) DeleteUser(user newUserRequest) error
- func (c Jcosmos) HealthCheck() error
- func (c Jcosmos) ListDatabase(resp databaseResponse) error
- func (c Jcosmos) ListDocument(pk []string, cont string, obj any) (string, error)
- func (c Jcosmos) ListOffer(q Query, obj ListOfferResponse) error
- func (c Jcosmos) ListTrigger(obj TriggerList) error
- func (c Jcosmos) ListUser(obj ListUserResponse) error
- func (c Jcosmos) PatchDocument(id string, pk []string, p Patch, obj any) error
- func (c Jcosmos) QueryDocument(pk []string, query Query, cont string, obj any) (string, error)
- func (c Jcosmos) QueryOffer(query Query, obj ListOfferResponse) error
- func (c Jcosmos) ReadDatabase(resp databaseResponse) error
- func (c Jcosmos) ReadDocument(id string, pk []string, obj any) error
- func (c Jcosmos) ReadOffer(rid string, obj OfferResponse) error
- func (c Jcosmos) ReadUser(user newUserRequest, obj UserResponse) error
- func (c Jcosmos) ReplaceOffer(offer OfferRequest, obj OfferResponse) error
- func (c Jcosmos) ReplaceTrigger(t Trigger, obj TriggerResponse) error
- func (c Jcosmos) UpdateDocument(id string, pk []string, obj any) error
- func (c Jcosmos) UpdateUser(user newUserRequest, obj UserResponse) error
- func (c Jcosmos) UseCol(coll string) *Jcosmos
- func (c Jcosmos) UseDB(db string) *Jcosmos
- func (c Jcosmos) UseLogLevel(loglevel loglevel) *Jcosmos
- func (c Jcosmos) XPartitionQueryDocument(query Query, cont string, obj any) (string, error)
- type ListOfferResponse
- type ListUserResponse
- type OfferContent
- type OfferRequest
- type OfferResponse
- type Parameter
- type Patch
- type PatchOp
- type PatchOperation
- type Query
- type QueryResponse
- type Trigger
- type TriggerList
- type TriggerResponse
- type UserResponse
Constants ¶
View Source
const ( CosmosDBSimulatorKey = "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==" JcosmosVersion = "0.0.2" )
View Source
const ( LogLevelTrace loglevel = 5 LogLevelDebug loglevel = 4 LogLevelInfo loglevel = 3 LogLevelWarn loglevel = 2 LogLevelError loglevel = 1 LogLevelNone loglevel = 0 )
View Source
const ( TriggerTypePre = "Pre" TriggerTypePost = "Post" TriggerOperationAll = "All" TriggerOperationCreate = "Create" TriggerOperationReplace = "Replace" TriggerOperationDelete = "Delete" )
View Source
const (
ErrorDatabaseIDTooLong = "database id is toolong, id must be between 1 and 255 characters"
)
View Source
const (
ErrorUserIDTooLong = "user id is toolong, id must be between 1 and 255 characters"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Jcosmos ¶
type Jcosmos struct {
// contains filtered or unexported fields
}
func (Jcosmos) CreateDatabase ¶
func (Jcosmos) CreateDatabaseWithAutopilot ¶
func (Jcosmos) CreateDatabaseWithThroughput ¶
func (Jcosmos) CreateDocument ¶
func (Jcosmos) CreateTrigger ¶
func (c Jcosmos) CreateTrigger(t Trigger, obj TriggerResponse) error
func (Jcosmos) CreateUser ¶
func (c Jcosmos) CreateUser(user newUserRequest, obj UserResponse) error
func (Jcosmos) DeleteDatabase ¶
func (Jcosmos) DeleteTrigger ¶
func (Jcosmos) DeleteUser ¶
func (Jcosmos) HealthCheck ¶
func (Jcosmos) ListDatabase ¶
func (Jcosmos) ListDocument ¶
func (Jcosmos) ListTrigger ¶
func (c Jcosmos) ListTrigger(obj TriggerList) error
func (Jcosmos) ListUser ¶
func (c Jcosmos) ListUser(obj ListUserResponse) error
func (Jcosmos) PatchDocument ¶
func (Jcosmos) QueryDocument ¶
func (Jcosmos) QueryOffer ¶
func (c Jcosmos) QueryOffer(query Query, obj ListOfferResponse) error
func (Jcosmos) ReadDatabase ¶
func (Jcosmos) ReadUser ¶
func (c Jcosmos) ReadUser(user newUserRequest, obj UserResponse) error
func (Jcosmos) ReplaceOffer ¶
func (c Jcosmos) ReplaceOffer(offer OfferRequest, obj OfferResponse) error
func (Jcosmos) ReplaceTrigger ¶
func (c Jcosmos) ReplaceTrigger(t Trigger, obj TriggerResponse) error
func (Jcosmos) UpdateDocument ¶
func (Jcosmos) UpdateUser ¶
func (c Jcosmos) UpdateUser(user newUserRequest, obj UserResponse) error
func (Jcosmos) UseLogLevel ¶
type ListOfferResponse ¶
type ListOfferResponse struct {
Offers []OfferResponse `json:"Offers"`
Count int `json:"_count"`
Rid string `json:"_rid"`
}
type ListUserResponse ¶
type ListUserResponse struct {
Users []UserResponse `json:"Users"`
Count int `json:"_count"`
Rid string `json:"_rid"`
}
type OfferContent ¶
type OfferContent struct {
OfferThroughput int `json:"offerThroughput"`
}
type OfferRequest ¶
type OfferRequest struct {
OfferVersion string `json:"offerVersion"`
Content OfferContent `json:"content"`
Resource string `json:"resource"`
OfferResourceID string `json:"offerResourceID"`
ID string `json:"id"`
Rid string `json:"_rid"`
}
permissions offers
type OfferResponse ¶
type OfferResponse struct {
OfferVersion string `json:"offerVersion"`
OfferType string `json:"offerType"`
Content OfferContent `json:"content"`
Resource string `json:"resource"`
OfferResourceID string `json:"offerResourceID"`
ID string `json:"id"`
Rid string `json:"_rid"`
Self string `json:"_self"`
Etag string `json:"_etag"`
Ts int64 `json:"_ts"`
}
type Patch ¶
type Patch struct {
Condition string `json:"condition,omitempty"`
Operations []PatchOperation `json:"operations"`
}
type PatchOperation ¶
type Query ¶
type QueryResponse ¶
type Trigger ¶
type Trigger struct {
ID string `json:"id"`
Body string `json:"body"`
TriggerOperation string `json:"triggerOperation"`
TriggerType string `json:"triggerType"`
}
attachments sprocs functions trigers
type TriggerList ¶
type TriggerList struct {
Triggers []TriggerResponse `json:"Users"`
Count int `json:"_count"`
Rid string `json:"_rid"`
}
type TriggerResponse ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.