Documentation
¶
Index ¶
Constants ¶
const ( SDKLanguage = "Go" DefaultRequestLibrary = "net/http" )
Variables ¶
var SDKSemverVersion string
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"`
AccountName *string `json:"account_name"`
}
ClientConfig contains information required for creating a client.
func NewDefaultConfig ¶
func NewDefaultConfig() ClientConfig
type CoreWrapper ¶ added in v0.4.0
type CoreWrapper struct {
InnerCore Core
}
func GetExtismCore ¶ added in v0.4.0
func GetExtismCore() (*CoreWrapper, error)
GetExtismCore initializes the shared core once and returns the already existing one on subsequent calls.
func GetSharedLibCore ¶ added in v0.4.0
func GetSharedLibCore(accountName string) (*CoreWrapper, error)
func (*CoreWrapper) InitClient ¶ added in v0.4.0
func (c *CoreWrapper) InitClient(ctx context.Context, config ClientConfig) (*uint64, error)
InitClient creates a client instance in the current core module and returns its unique ID.
func (*CoreWrapper) Invoke ¶ added in v0.4.0
func (c *CoreWrapper) Invoke(ctx context.Context, invokeConfig InvokeConfig) (*string, error)
Invoke calls specified business logic from core
func (*CoreWrapper) ReleaseClient ¶ added in v0.4.0
func (c *CoreWrapper) ReleaseClient(clientID uint64)
ReleaseClient releases memory in the core associated with the given client ID.
type ExtismCore ¶ added in v0.4.0
type ExtismCore struct {
// contains filtered or unexported fields
}
ExtismCore implements Core in such a way that all created client instances share the same core resources.
func (*ExtismCore) InitClient ¶ added in v0.4.0
InitClient creates a client instance in the current core module and returns its unique ID.
func (*ExtismCore) ReleaseClient ¶ added in v0.4.0
func (c *ExtismCore) ReleaseClient(clientID []byte)
ReleaseClient releases memory in the core associated with the given client ID.
type InnerClient ¶
type InnerClient struct {
ID uint64
Config ClientConfig
Core CoreWrapper
}
InnerClient represents the sdk-core client on which calls will be made.
type Invocation ¶
type Invocation struct {
ClientID *uint64 `json:"clientId,omitempty"`
Parameters Parameters `json:"parameters"`
}
Invocation holds the information required for invoking SDK functionality.
type InvokeConfig ¶
type InvokeConfig struct {
Invocation Invocation `json:"invocation"`
}
InvokeConfig specifies over the FFI on which client the specified method should be invoked on.
type Parameters ¶ added in v0.1.2
type SharedLibCore ¶ added in v0.4.0
type SharedLibCore struct {
// contains filtered or unexported fields
}
func (*SharedLibCore) InitClient ¶ added in v0.4.0
InitClient creates a client instance in the current core module and returns its unique ID.
func (*SharedLibCore) ReleaseClient ¶ added in v0.4.0
func (slc *SharedLibCore) ReleaseClient(clientID []byte)
ReleaseClient releases memory in the core associated with the given client ID.