...

Source file src/go.mongodb.org/mongo-driver/x/mongo/driver/mongocrypt/mongocrypt_kms_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  // KmsContext represents a mongocrypt_kms_ctx_t handle.
    13  type KmsContext struct{}
    14  
    15  // HostName gets the host name of the KMS.
    16  func (kc *KmsContext) HostName() (string, error) {
    17  	panic(cseNotSupportedMsg)
    18  }
    19  
    20  // Message returns the message to send to the KMS.
    21  func (kc *KmsContext) Message() ([]byte, error) {
    22  	panic(cseNotSupportedMsg)
    23  }
    24  
    25  // KMSProvider gets the KMS provider of the KMS context.
    26  func (kc *KmsContext) KMSProvider() string {
    27  	panic(cseNotSupportedMsg)
    28  }
    29  
    30  // BytesNeeded returns the number of bytes that should be received from the KMS.
    31  // After sending the message to the KMS, this message should be called in a loop until the number returned is 0.
    32  func (kc *KmsContext) BytesNeeded() int32 {
    33  	panic(cseNotSupportedMsg)
    34  }
    35  
    36  // FeedResponse feeds the bytes received from the KMS to mongocrypt.
    37  func (kc *KmsContext) FeedResponse([]byte) error {
    38  	panic(cseNotSupportedMsg)
    39  }
    40  

View as plain text