...

Source file src/go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/mongocrypt_context_not_enabled.go

Documentation: go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt

     1  // Copyright (C) MongoDB, Inc. 2017-present.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License"); you may
     4  // not use this file except in compliance with the License. You may obtain
     5  // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
     6  
     7  //go:build !cse
     8  // +build !cse
     9  
    10  package mongocrypt
    11  
    12  import (
    13  	"go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
    14  )
    15  
    16  // Context represents a mongocrypt_ctx_t handle
    17  type Context struct{}
    18  
    19  // State returns the current State of the Context.
    20  func (c *Context) State() State {
    21  	panic(cseNotSupportedMsg)
    22  }
    23  
    24  // NextOperation gets the document for the next database operation to run.
    25  func (c *Context) NextOperation() (bsoncore.Document, error) {
    26  	panic(cseNotSupportedMsg)
    27  }
    28  
    29  // AddOperationResult feeds the result of a database operation to mongocrypt.
    30  func (c *Context) AddOperationResult(bsoncore.Document) error {
    31  	panic(cseNotSupportedMsg)
    32  }
    33  
    34  // CompleteOperation signals a database operation has been completed.
    35  func (c *Context) CompleteOperation() error {
    36  	panic(cseNotSupportedMsg)
    37  }
    38  
    39  // NextKmsContext returns the next KmsContext, or nil if there are no more.
    40  func (c *Context) NextKmsContext() *KmsContext {
    41  	panic(cseNotSupportedMsg)
    42  }
    43  
    44  // FinishKmsContexts signals that all KMS contexts have been completed.
    45  func (c *Context) FinishKmsContexts() error {
    46  	panic(cseNotSupportedMsg)
    47  }
    48  
    49  // Finish performs the final operations for the context and returns the resulting document.
    50  func (c *Context) Finish() (bsoncore.Document, error) {
    51  	panic(cseNotSupportedMsg)
    52  }
    53  
    54  // Close cleans up any resources associated with the given Context instance.
    55  func (c *Context) Close() {
    56  	panic(cseNotSupportedMsg)
    57  }
    58  
    59  // ProvideKmsProviders provides the KMS providers when in the NeedKmsCredentials state.
    60  func (c *Context) ProvideKmsProviders(bsoncore.Document) error {
    61  	panic(cseNotSupportedMsg)
    62  }
    63  

View as plain text