Documentation ¶
Index ¶
- func NewControllerClient(config ControllerConfig) controller.Interface
- type AliasClient
- func (ac *AliasClient) Create(ctx context.Context, scope, target string, alias *meta.Alias, dryRun bool) (diff.Changelog, error)
- func (ac *AliasClient) Delete(ctx context.Context, scope, key string, dryRun bool) (diff.Changelog, error)
- func (ac *AliasClient) Get(ctx context.Context, scope, key string) (*meta.Alias, error)
- func (ac *AliasClient) Update(ctx context.Context, scope, target string, alias *meta.Alias, dryRun bool) (diff.Changelog, error)
- type AppClient
- func (ac *AppClient) Create(ctx context.Context, scope string, app *meta.App, dryRun bool) (diff.Changelog, error)
- func (ac *AppClient) Delete(ctx context.Context, scope string, dryRun bool) (diff.Changelog, error)
- func (ac *AppClient) Get(ctx context.Context, scope string) (*meta.App, error)
- func (ac *AppClient) Update(ctx context.Context, scope string, app *meta.App, dryRun bool) (diff.Changelog, error)
- type AuthClient
- type BrokersClient
- type ChannelClient
- func (cc *ChannelClient) Create(ctx context.Context, scope string, ch *meta.Channel, dryRun bool) (diff.Changelog, error)
- func (cc *ChannelClient) Delete(ctx context.Context, scope, name string, dryRun bool) (diff.Changelog, error)
- func (cc *ChannelClient) Get(ctx context.Context, scope, name string) (*meta.Channel, error)
- func (cc *ChannelClient) Update(ctx context.Context, scope string, ch *meta.Channel, dryRun bool) (diff.Changelog, error)
- type Client
- func (c *Client) Alias() controller.AliasInterface
- func (c *Client) Apps() controller.AppInterface
- func (c *Client) Authorization() controller.AuthorizationInterface
- func (c *Client) Brokers() controller.BrokersInterface
- func (c *Client) Channels() controller.ChannelInterface
- func (c *Client) Types() controller.TypeInterface
- type ControllerConfig
- type TypeClient
- func (tc *TypeClient) Create(ctx context.Context, scope string, t *meta.Type, dryRun bool) (diff.Changelog, error)
- func (tc *TypeClient) Delete(ctx context.Context, scope, name string, dryRun bool) (diff.Changelog, error)
- func (tc *TypeClient) Get(ctx context.Context, scope, name string) (*meta.Type, error)
- func (tc *TypeClient) Update(ctx context.Context, scope string, t *meta.Type, dryRun bool) (diff.Changelog, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewControllerClient ¶
func NewControllerClient(config ControllerConfig) controller.Interface
NewControllerClient return a new Client
Types ¶
type AliasClient ¶
type AliasClient struct {
// contains filtered or unexported fields
}
AliasClient is a client for manipulating Alias structures in Insprd
func (*AliasClient) Create ¶
func (ac *AliasClient) Create(ctx context.Context, scope, target string, alias *meta.Alias, dryRun bool) (diff.Changelog, error)
Create creates an alias inside the Insprd The scope refers to the parent app of the given alias, represented with a dot separated query such as app1.app2. The parameter "target" refers to where the alias will point to
func (*AliasClient) Delete ¶
func (ac *AliasClient) Delete(ctx context.Context, scope, key string, dryRun bool) (diff.Changelog, error)
Delete deletes a alias inside the Insprd The scope refers to the parent app of the given alias, represented with a dot separated query such as app1.app2. The key is the key of the alias to be deleted.
func (*AliasClient) Get ¶
Get gets a alias from the Insprd The scope refers to the parent app of the given alias, represented with a dot separated query such as app1.app2. The key is the key of the alias
func (*AliasClient) Update ¶
func (ac *AliasClient) Update(ctx context.Context, scope, target string, alias *meta.Alias, dryRun bool) (diff.Changelog, error)
Update updates a alias inside the Insprd The scope refers to the parent app of the given alias, represented with a dot separated query such as app1.app2. Works similarly to the Create method.
type AppClient ¶
type AppClient struct {
// contains filtered or unexported fields
}
AppClient is a client for manipulating dApp structures in Insprd
func (*AppClient) Create ¶
func (ac *AppClient) Create(ctx context.Context, scope string, app *meta.App, dryRun bool) (diff.Changelog, error)
Create creates given dApp in Insprd The scope refers to the parent app where the actual app will be instantiated, represented with a dot separated query such as **app1.app2**.
func (*AppClient) Delete ¶
Delete deletes a dApp that exists in Insprd. The scope refers to the app itself, represented with a dot separated query such as app1.app2
func (*AppClient) Get ¶
Get gets information of a dApp that exists in Insprd. The scope refers to the app itself, represented with a dot separated query such as app1.app2
func (*AppClient) Update ¶
func (ac *AppClient) Update(ctx context.Context, scope string, app *meta.App, dryRun bool) (diff.Changelog, error)
Update updates a dApp in Insprd, if it exists. The scope refers to the parent dApp where the actual dApp is instantiated, represented with a dot separated query such as app1.app2
type AuthClient ¶
type AuthClient struct {
// contains filtered or unexported fields
}
AuthClient is a client for getting auth information from Insprd
func (*AuthClient) GenerateToken ¶
GenerateToken sends a request containing a payload so Insprd generates a new auth token based on the payload's info
type BrokersClient ¶
type BrokersClient struct {
// contains filtered or unexported fields
}
BrokersClient interacts with Brokers on the Insprd
type ChannelClient ¶
type ChannelClient struct {
// contains filtered or unexported fields
}
ChannelClient is a client for manipulating Channel structures in Insprd
func (*ChannelClient) Create ¶
func (cc *ChannelClient) Create(ctx context.Context, scope string, ch *meta.Channel, dryRun bool) (diff.Changelog, error)
Create creates given channel inside of Insprd The scope refers to the parent app of the given channel, represented with a dot separated query such as app1.app2
func (*ChannelClient) Delete ¶
func (cc *ChannelClient) Delete(ctx context.Context, scope, name string, dryRun bool) (diff.Changelog, error)
Delete deletes a channel inside the Insprd The scope refers to the parent app of the given channel, represented with a dot separated query such as app1.app2. The name is the name of the channel to be deleted
func (*ChannelClient) Get ¶
Get gets a channel from Insprd The scope refers to the parent app of the given channel, represented with a dot separated query such as app1.app2. The name is the name of the channel.
func (*ChannelClient) Update ¶
func (cc *ChannelClient) Update(ctx context.Context, scope string, ch *meta.Channel, dryRun bool) (diff.Changelog, error)
Update updates given channel structure, if it exists in Insprd The scope refers to the parent app of the given channel, represented with a dot separated query such as app1.app2
type Client ¶
type Client struct { HTTPClient *request.Client Config ControllerConfig }
Client implements communication with the Insprd
func (*Client) Alias ¶
func (c *Client) Alias() controller.AliasInterface
Alias interacts with alias on the Insprd
func (*Client) Apps ¶
func (c *Client) Apps() controller.AppInterface
Apps interacts with apps on the Insprd
func (*Client) Authorization ¶
func (c *Client) Authorization() controller.AuthorizationInterface
Authorization interacts with Insprd's auth
func (*Client) Brokers ¶
func (c *Client) Brokers() controller.BrokersInterface
Brokers interacts with brokers from the Insprd
func (*Client) Channels ¶
func (c *Client) Channels() controller.ChannelInterface
Channels interacts with channels on the Insprd
func (*Client) Types ¶
func (c *Client) Types() controller.TypeInterface
Types interacts with types on the Insprd
type ControllerConfig ¶
type ControllerConfig struct { Auth request.Authenticator Scope string URL string Host string }
ControllerConfig stores controller configuration for ease of use and posterior verification.
func GetInClusterConfigs ¶
func GetInClusterConfigs() (*ControllerConfig, error)
GetInClusterConfigs retrieves controller configs from current dApp deployment.
type TypeClient ¶
type TypeClient struct {
// contains filtered or unexported fields
}
TypeClient is a client for manipulating Type structures in Insprd
func (*TypeClient) Create ¶
func (tc *TypeClient) Create(ctx context.Context, scope string, t *meta.Type, dryRun bool) (diff.Changelog, error)
Create creates given Type inside of Insprd The scope refers to the dApp in which the Type will be in, represented with a dot separated query such as app1.app2
func (*TypeClient) Delete ¶
func (tc *TypeClient) Delete(ctx context.Context, scope, name string, dryRun bool) (diff.Changelog, error)
Delete deletes a Type from Insprd, if exists. The scope refers to the dApp in which the Type is in, represented with a dot separated query such as app1.app2. The name is the name of the Type to be deleted
func (*TypeClient) Get ¶
Get gets a Type from Insprd, if it exists. The scope refers to the dApp in which the Type is in, represented with a dot separated query such as app1.app2
func (*TypeClient) Update ¶
func (tc *TypeClient) Update(ctx context.Context, scope string, t *meta.Type, dryRun bool) (diff.Changelog, error)
Update updates given Type in Insprd, if it exists. The scope refers to the dApp in which the Type is in, represented with a dot separated query such asapp1.app2