Documentation ¶
Index ¶
- Constants
- type AuthManager
- type AuthenticateArgs
- type AuthenticateResult
- type BaseCache
- type CreateContainerArgs
- type CreateContainerResult
- type CreateQueueArgs
- type CreateQueueResult
- type CreateStateMachineArgs
- type CreateStateMachineResult
- type DeleteContainerArgs
- type DeleteQueueArgs
- type DeleteStateMachineArgs
- type DeleteStateMachineResult
- type FileServiceClient
- func (cs *FileServiceClient) CreateContainer(data *CreateContainerArgs) (*CreateContainerResult, error)
- func (cs *FileServiceClient) DeleteContainerOrPath(data *DeleteContainerArgs) error
- func (cs *FileServiceClient) ListContainerContents(data *ListContainerContentsArgs) (*ListContainerContentsResult, error)
- type GetQueueDetailsArgs
- type GetQueueDetailsResult
- type GetStateMachineDetailsArgs
- type GetStateMachineDetailsResult
- type IdentityClient
- func (ic *IdentityClient) Authenticate(data *AuthenticateArgs) (*AuthenticateResult, error)
- func (ic *IdentityClient) GetPublicSignature() (*PublicSignatureResponse, error)
- func (ic *IdentityClient) ImpersonateUser(data *ImpersonateUserArgs) (*ImpersonateUserResult, error)
- func (ic *IdentityClient) Register(data *RegisterAccountArgs) (*RegisterResult, error)
- func (ic *IdentityClient) UpdateUser(data *UpdateUserArgs) error
- type ImpersonateUserArgs
- type ImpersonateUserResult
- type InMemoryCache
- type ListContainerContentsArgs
- type ListContainerContentsResult
- type PublicSignatureResponse
- type QueueServiceClient
- func (qs *QueueServiceClient) CreateQueue(data *CreateQueueArgs) (*CreateQueueResult, error)
- func (qs *QueueServiceClient) DeleteQueue(data *DeleteQueueArgs) error
- func (qs *QueueServiceClient) GetQueueDetails(data *GetQueueDetailsArgs) (*GetQueueDetailsResult, error)
- func (qs *QueueServiceClient) UpdateQueue(data *UpdateQueueArgs) error
- type RegisterAccountArgs
- type RegisterResult
- type Sdk
- func (s *Sdk) GetFileServiceClient() *FileServiceClient
- func (s *Sdk) GetIdentityClient() *IdentityClient
- func (s *Sdk) GetQueueServiceClient() *QueueServiceClient
- func (s *Sdk) GetServerlessFunctionsClient() *ServerlessFunctionsClient
- func (s *Sdk) GetStateMachineServiceClient() *StateMachineServiceClient
- type ServerlessFunctionDetails
- type ServerlessFunctionSummary
- type ServerlessFunctionsClient
- func (c *ServerlessFunctionsClient) CreateFunction(name string) (*ServerlessFunctionSummary, error)
- func (c *ServerlessFunctionsClient) DeleteFunction(orid string) error
- func (c *ServerlessFunctionsClient) GetFunctionDetails(orid string) (*ServerlessFunctionDetails, error)
- func (c *ServerlessFunctionsClient) InvokeFunction(orid string, body interface{}) (interface{}, error)
- func (c *ServerlessFunctionsClient) ListFunctions() (*[]ServerlessFunctionSummary, error)
- func (c *ServerlessFunctionsClient) UpdateFunctionCode(data *UpdateFunctionCodeArgs) error
- type StateMachineServiceClient
- func (cs *StateMachineServiceClient) CreateStateMachine(data *CreateStateMachineArgs) (*CreateStateMachineResult, error)
- func (cs *StateMachineServiceClient) DeleteStateMachine(data *DeleteStateMachineArgs) (*DeleteStateMachineResult, error)
- func (cs *StateMachineServiceClient) GetStateMachineDetails(data *GetStateMachineDetailsArgs) (*GetStateMachineDetailsResult, error)
- func (cs *StateMachineServiceClient) UpdateStateMachine(data *UpdateStateMachineArgs) (*UpdateStateMachineResult, error)
- type UpdateFunctionCodeArgs
- type UpdateQueueArgs
- type UpdateStateMachineArgs
- type UpdateStateMachineResult
- type UpdateUserArgs
Constants ¶
const API_TIMEOUT = 15 * time.Minute
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthManager ¶
type AuthManager struct {
// contains filtered or unexported fields
}
AuthManager Client to manage authorization credentials for various MDS Cloud calls
func NewAuthManager ¶
func NewAuthManager(identityURL string, userID string, password string, account string, allowSelfSignCert bool, enableSemaphore bool) *AuthManager
NewAuthManager Creates a new AuthManager client
func (*AuthManager) GetAuthenticationToken ¶
func (am *AuthManager) GetAuthenticationToken(overrides map[string]string) (string, error)
GetAuthenticationToken Gets an authentication token to use against the MDS apis
type AuthenticateArgs ¶
type AuthenticateArgs struct { AccountID string `json:"accountId"` UserID string `json:"userId"` Password string `json:"password"` }
AuthenticateArgs Data needed to authenticate a user
type AuthenticateResult ¶
type AuthenticateResult struct {
Token string `json:"token"`
}
AuthenticateResult Authentication results
type BaseCache ¶
type BaseCache interface { Set(key string, value interface{}) Get(key string) interface{} Remove(key string) RemoveAll() }
BaseCache Simple in-memory cache
type CreateContainerArgs ¶
type CreateContainerArgs struct {
Name string `json:"name"`
}
CreateContainerArgs Data needed to create a new container
type CreateContainerResult ¶
type CreateContainerResult struct {
Orid string `json:"orid"`
}
CreateContainerResult Create container results
type CreateQueueArgs ¶
type CreateQueueArgs struct { Name string `json:"name"` Resource string `json:"resource,omitempty"` Dlq string `json:"dlq,omitempty"` }
CreateQueueArgs Data needed to create a new queue
type CreateQueueResult ¶
type CreateQueueResult struct { Status string `json:"status"` Name string `json:"name"` Orid string `json:"orid"` }
CreateQueueResult Create queue results
type CreateStateMachineArgs ¶
type CreateStateMachineArgs struct {
Definition string
}
CreateStateMachineArgs Data needed to create a new state machine
type CreateStateMachineResult ¶
type CreateStateMachineResult struct {
Orid string `json:"orid"`
}
CreateStateMachineResult Create state machine results
type DeleteContainerArgs ¶
type DeleteContainerArgs struct {
Orid string `json:"orid"`
}
DeleteContainerArgs Data needed to delete a container
type DeleteQueueArgs ¶
type DeleteQueueArgs struct {
Orid string `json:"orid"`
}
DeleteQueueArgs Data needed to delete a queue
type DeleteStateMachineArgs ¶
type DeleteStateMachineArgs struct {
Orid string
}
DeleteStateMachineArgs Data needed to delete a state machine
type DeleteStateMachineResult ¶
type DeleteStateMachineResult struct {
Orid string `json:"orid"`
}
DeleteStateMachineResult Delete state machine result
type FileServiceClient ¶
type FileServiceClient struct {
// contains filtered or unexported fields
}
FileServiceClient Client to interact with the MDS Cloud container service
func (*FileServiceClient) CreateContainer ¶
func (cs *FileServiceClient) CreateContainer(data *CreateContainerArgs) (*CreateContainerResult, error)
CreateContainer Attempts to create a new container with the MDS Cloud deployment
func (*FileServiceClient) DeleteContainerOrPath ¶
func (cs *FileServiceClient) DeleteContainerOrPath(data *DeleteContainerArgs) error
DeleteContainerOrPath Attempts to delete a container or path within a container in the MDS Cloud deployment
func (*FileServiceClient) ListContainerContents ¶
func (cs *FileServiceClient) ListContainerContents(data *ListContainerContentsArgs) (*ListContainerContentsResult, error)
ListContainerContents Attempts to create a new container with the MDS Cloud deployment
type GetQueueDetailsArgs ¶
type GetQueueDetailsArgs struct {
Orid string `json:"orid"`
}
GetQueueDetailsArgs Data needed to fetch queue details
type GetQueueDetailsResult ¶
type GetQueueDetailsResult struct { Orid string `json:"orid"` Resource string `json:"resource,omitempty"` Dlq string `json:"dlq,omitempty"` }
GetQueueDetailsResult The details of the given queue
type GetStateMachineDetailsArgs ¶
type GetStateMachineDetailsArgs struct {
Orid string
}
GetStateMachineDetailsArgs Data needed to fetch state machine details
type GetStateMachineDetailsResult ¶
type GetStateMachineDetailsResult struct { Orid string `json:"orid"` Name string `json:"name"` Definition interface{} `json:"definition"` }
GetStateMachineDetailsResult Get state machine details result
type IdentityClient ¶
type IdentityClient struct {
// contains filtered or unexported fields
}
IdentityClient Client to interact with MDS Cloud identity service
func (*IdentityClient) Authenticate ¶
func (ic *IdentityClient) Authenticate(data *AuthenticateArgs) (*AuthenticateResult, error)
Authenticate Attempts to authenticate a user against the MDS Cloud deployment
func (*IdentityClient) GetPublicSignature ¶
func (ic *IdentityClient) GetPublicSignature() (*PublicSignatureResponse, error)
GetPublicSignature Gets the active public signature from the MDS Cloud deployment
func (*IdentityClient) ImpersonateUser ¶
func (ic *IdentityClient) ImpersonateUser(data *ImpersonateUserArgs) (*ImpersonateUserResult, error)
ImpersonateUser Get impersonation token for a user on a given account
func (*IdentityClient) Register ¶
func (ic *IdentityClient) Register(data *RegisterAccountArgs) (*RegisterResult, error)
Register Attempts to register a new account with the MDS Cloud deployment
func (*IdentityClient) UpdateUser ¶
func (ic *IdentityClient) UpdateUser(data *UpdateUserArgs) error
UpdateUser Attempts to update various aspects of the user
type ImpersonateUserArgs ¶
type ImpersonateUserArgs struct {
AccountID string `json:"accountId"`
}
ImpersonateUserArgs Data needed to authenticate a user
type ImpersonateUserResult ¶
type ImpersonateUserResult struct {
Token string `json:"token"`
}
ImpersonateUserResult Impersonation result
type InMemoryCache ¶
type InMemoryCache struct {
// contains filtered or unexported fields
}
InMemoryCache Simple in-memory cache
func NewInMemoryCache ¶
func NewInMemoryCache() *InMemoryCache
NewInMemoryCache Creates a new in-memory cache
func (*InMemoryCache) Get ¶
func (c *InMemoryCache) Get(key string) interface{}
Get Retrieves an item from the in-memory cache
func (*InMemoryCache) Remove ¶
func (c *InMemoryCache) Remove(key string)
Remove Removes an item from the in-memory cache if it exists
func (*InMemoryCache) RemoveAll ¶
func (c *InMemoryCache) RemoveAll()
RemoveAll Removes all items from the in-memory cache
func (*InMemoryCache) Set ¶
func (c *InMemoryCache) Set(key string, value interface{})
Set Adds an item to the in-memory cache
type ListContainerContentsArgs ¶
type ListContainerContentsArgs struct {
Orid string `json:"orid"`
}
ListContainerContentsArgs Data needed to create a new container
type ListContainerContentsResult ¶
type ListContainerContentsResult struct { Directories []string `json:"directories"` Files []string `json:"files"` }
ListContainerContentsResult Create container results
type PublicSignatureResponse ¶
type PublicSignatureResponse struct {
Signature string `json:"signature"`
}
PublicSignatureResponse Response object holding the public signature
type QueueServiceClient ¶
type QueueServiceClient struct {
// contains filtered or unexported fields
}
QueueServiceClient Client to interact with the MDS Cloud queue service
func (*QueueServiceClient) CreateQueue ¶
func (qs *QueueServiceClient) CreateQueue(data *CreateQueueArgs) (*CreateQueueResult, error)
CreateQueue Attempts to create a new queue with the MDS Cloud deployment
func (*QueueServiceClient) DeleteQueue ¶
func (qs *QueueServiceClient) DeleteQueue(data *DeleteQueueArgs) error
DeleteQueue Attempts to delete a queue from the MDS Cloud deployment
func (*QueueServiceClient) GetQueueDetails ¶
func (qs *QueueServiceClient) GetQueueDetails(data *GetQueueDetailsArgs) (*GetQueueDetailsResult, error)
GetQueueDetails Gets details for the specified queue
func (*QueueServiceClient) UpdateQueue ¶
func (qs *QueueServiceClient) UpdateQueue(data *UpdateQueueArgs) error
UpdateQueue Attempts to create a new queue with the MDS Cloud deployment
type RegisterAccountArgs ¶
type RegisterAccountArgs struct { UserID string `json:"userId"` Email string `json:"email"` Password string `json:"password"` FriendlyName string `json:"friendlyName"` AccountName string `json:"accountName"` }
RegisterAccountArgs Data needed to register a new account
type RegisterResult ¶
RegisterResult Result of the account registration operation
type Sdk ¶
type Sdk struct {
// contains filtered or unexported fields
}
Sdk Object to interact with various MDS Cloud resources
func NewSdk ¶
func NewSdk(account string, userID string, password string, allowSelfCert bool, enableAuthSemaphore bool, urls map[string]string) *Sdk
NewSdk Creates a new SDK object
account - The account that clients will act against userId - The user id used during authentication password - The password used during authentication allowSelfCert - Allow HTTPS authentication when self-signed certificate used
urls - Key value map for various clients to act against.
identityUrl - identity service url qsUrl - queue service url smUrl - state machine service url fsUrl - file service url nsUrl - notification service url sfUrl - serverless function service url
func (*Sdk) GetFileServiceClient ¶
func (s *Sdk) GetFileServiceClient() *FileServiceClient
GetFileServiceClient Gets a new file service client
func (*Sdk) GetIdentityClient ¶
func (s *Sdk) GetIdentityClient() *IdentityClient
GetIdentityClient Gets a new identity client
func (*Sdk) GetQueueServiceClient ¶
func (s *Sdk) GetQueueServiceClient() *QueueServiceClient
GetQueueServiceClient Gets a new queue service client
func (*Sdk) GetServerlessFunctionsClient ¶
func (s *Sdk) GetServerlessFunctionsClient() *ServerlessFunctionsClient
GetServerlessFunctionsClient Gets a new serverless function client
func (*Sdk) GetStateMachineServiceClient ¶
func (s *Sdk) GetStateMachineServiceClient() *StateMachineServiceClient
GetStateMachineServiceClient Gets a new state machine service client
type ServerlessFunctionDetails ¶
type ServerlessFunctionDetails struct { Orid string Name string Version string Runtime string EntryPoint string Created string LastUpdate string LastInvoke string }
ServerlessFunctionDetails Data describing the serverless function
type ServerlessFunctionSummary ¶
ServerlessFunctionSummary Function summary details
type ServerlessFunctionsClient ¶
type ServerlessFunctionsClient struct {
// contains filtered or unexported fields
}
ServerlessFunctionsClient Client to interact with MDS Cloud serverless functions
func (*ServerlessFunctionsClient) CreateFunction ¶
func (c *ServerlessFunctionsClient) CreateFunction(name string) (*ServerlessFunctionSummary, error)
CreateFunction Create a new serverless function
func (*ServerlessFunctionsClient) DeleteFunction ¶
func (c *ServerlessFunctionsClient) DeleteFunction(orid string) error
DeleteFunction .
func (*ServerlessFunctionsClient) GetFunctionDetails ¶
func (c *ServerlessFunctionsClient) GetFunctionDetails(orid string) (*ServerlessFunctionDetails, error)
GetFunctionDetails Gets details for a function
func (*ServerlessFunctionsClient) InvokeFunction ¶
func (c *ServerlessFunctionsClient) InvokeFunction(orid string, body interface{}) (interface{}, error)
InvokeFunction .
func (*ServerlessFunctionsClient) ListFunctions ¶
func (c *ServerlessFunctionsClient) ListFunctions() (*[]ServerlessFunctionSummary, error)
ListFunctions List the available functions
func (*ServerlessFunctionsClient) UpdateFunctionCode ¶
func (c *ServerlessFunctionsClient) UpdateFunctionCode(data *UpdateFunctionCodeArgs) error
type StateMachineServiceClient ¶
type StateMachineServiceClient struct {
// contains filtered or unexported fields
}
StateMachineServiceClient Client to interact with the MDS Cloud state machine service
func (*StateMachineServiceClient) CreateStateMachine ¶
func (cs *StateMachineServiceClient) CreateStateMachine(data *CreateStateMachineArgs) (*CreateStateMachineResult, error)
CreateStateMachine Attempts to create a new state machine within the MDS Cloud deployment
func (*StateMachineServiceClient) DeleteStateMachine ¶
func (cs *StateMachineServiceClient) DeleteStateMachine(data *DeleteStateMachineArgs) (*DeleteStateMachineResult, error)
DeleteStateMachine Attempts to delete a state machine within the MDS Cloud deployment
func (*StateMachineServiceClient) GetStateMachineDetails ¶
func (cs *StateMachineServiceClient) GetStateMachineDetails(data *GetStateMachineDetailsArgs) (*GetStateMachineDetailsResult, error)
GetStateMachineDetails Attempts to fetch the details of a state machine within the MDS Cloud deployment
func (*StateMachineServiceClient) UpdateStateMachine ¶
func (cs *StateMachineServiceClient) UpdateStateMachine(data *UpdateStateMachineArgs) (*UpdateStateMachineResult, error)
UpdateStateMachine Attempts to create a new state machine within the MDS Cloud deployment
type UpdateFunctionCodeArgs ¶
type UpdateFunctionCodeArgs struct { Orid string Runtime string EntryPoint string SourcePathOrFile string Context string }
UpdateFunctionCode .
type UpdateQueueArgs ¶
type UpdateQueueArgs struct { Orid string `json:"orid"` Resource string `json:"resource,omitempty"` Dlq string `json:"dlq,omitempty"` }
UpdateQueueArgs Data needed to create a new queue
type UpdateStateMachineArgs ¶
UpdateStateMachineArgs Data needed to create a new state machine
type UpdateStateMachineResult ¶
type UpdateStateMachineResult struct {
Orid string `json:"orid"`
}
UpdateStateMachineResult Create state machine results