Documentation ¶
Index ¶
Constants ¶
const ( SDKSemverVersion = "0010009" // v0.1.0-beta.9 SDKLanguage = "Go" DefaultRequestLibrary = "net/http" )
Variables ¶
This section is empty.
Functions ¶
func ImportedFunctions ¶
func ImportedFunctions() []extism.HostFunction
ImportedFunctions returns all functions 1Password SDK core must import.
func ReleaseCore ¶
func ReleaseCore()
Types ¶
type ClientConfig ¶
type ClientConfig struct { SAToken string `json:"serviceAccountToken"` Language string `json:"programmingLanguage"` SDKVersion string `json:"sdkVersion"` IntegrationName string `json:"integrationName"` IntegrationVersion string `json:"integrationVersion"` RequestLibraryName string `json:"requestLibraryName"` RequestLibraryVersion string `json:"requestLibraryVersion"` SystemOS string `json:"os"` SystemOSVersion string `json:"osVersion"` SystemArch string `json:"architecture"` }
ClientConfig contains information required for creating a client.
func NewDefaultConfig ¶
func NewDefaultConfig() ClientConfig
type InnerClient ¶
InnerClient represents the sdk-core client on which calls will be made.
type Invocation ¶
type Invocation struct { MethodName string `json:"name"` SerializedParams map[string]interface{} `json:"parameters"` }
Invocation holds the information required for invoking SDK functionality.
type InvokeConfig ¶
type InvokeConfig struct { ClientID uint64 `json:"clientId"` Invocation Invocation `json:"invocation"` }
InvokeConfig specifies over the FFI on which client the specified method should be invoked on.
type SharedCore ¶
type SharedCore struct {
// contains filtered or unexported fields
}
SharedCore implements Core in such a way that all created client instances share the same core resources.
func GetSharedCore ¶
func GetSharedCore() (*SharedCore, error)
GetSharedCore initializes the shared core once and returns the already existing one on subsequent calls.
func (*SharedCore) InitClient ¶
func (c *SharedCore) InitClient(ctx context.Context, config ClientConfig) (*uint64, error)
InitClient creates a client instance in the current core module and returns its unique ID.
func (*SharedCore) Invoke ¶
func (c *SharedCore) Invoke(ctx context.Context, invokeConfig InvokeConfig) (*string, error)
Invoke calls specified business logic from core
func (*SharedCore) ReleaseClient ¶
func (c *SharedCore) ReleaseClient(clientID uint64)
ReleaseClient releases memory in the core associated with the given client ID.