Documentation ¶
Overview ¶
Package client provides configuration and convenience methods for making API calls to the holos server.
Package client provides client configuration for the holos cli.
Index ¶
- Constants
- func LoadPlatformConfig(ctx context.Context, name string) (*object.PlatformConfig, error)
- func LoadPlatformMetadata(ctx context.Context, name string) (*platform.Platform, error)
- func SavePlatformConfig(ctx context.Context, name string, pc *object.PlatformConfig) (string, error)
- type Client
- func (c *Client) CreatePlatform(ctx context.Context, pm PlatformMutation) (*platform.CreatePlatformResponse, error)
- func (c *Client) DeletePlatform(ctx context.Context, platformID string) (*platform.DeletePlatformResponse, error)
- func (c *Client) PlatformModel(ctx context.Context, platformID string) (*structpb.Struct, error)
- func (c *Client) Platforms(ctx context.Context, orgID string) ([]*platform.Platform, error)
- func (c *Client) UpdateForm(ctx context.Context, platformID string, form *object.Form) error
- func (c *Client) UpdatePlatformModel(ctx context.Context, platformID string, model *structpb.Struct) error
- type Config
- type PlatformMutation
Constants ¶
const PlatformConfigFile = "platform.config.json"
PlatformConfigFile represents the marshaled json representation of the PlatformConfig DTO used to persist the inputs to the CUE platform code.
const PlatformMetadataFile = "platform.metadata.json"
PlatformMetadataFile is the platform metadata json file name located in the root of a platform directory. This file is the authoritative source of truth for the PlatformID used in rpc calls to the PlatformService.
Variables ¶
This section is empty.
Functions ¶
func LoadPlatformConfig ¶
LoadPlatformConfig loads the PlatformConfig DTO from the platform.config.json file. Useful to provide all values necessary to render cue config without an rpc to the HolosService.
func LoadPlatformMetadata ¶ added in v0.90.0
LoadPlatformMetadata loads the platform.metadata.json file from a named path. Used as the authoritative source of truth to obtain a platform id for PlatformService rpc methods.
func SavePlatformConfig ¶
func SavePlatformConfig(ctx context.Context, name string, pc *object.PlatformConfig) (string, error)
SavePlatformConfig writes pc to the platform root directory path identified by name.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides convenience methods for making API calls to the holos server.
func (*Client) CreatePlatform ¶
func (c *Client) CreatePlatform(ctx context.Context, pm PlatformMutation) (*platform.CreatePlatformResponse, error)
func (*Client) DeletePlatform ¶ added in v0.90.0
func (*Client) PlatformModel ¶
PlatformModel gets the platform model from the PlatformService.
func (*Client) UpdateForm ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) Client ¶
func (c *Config) Client() *holos.ClientConfig
func (*Config) ClientFlagSet ¶
func (*Config) Context ¶
func (c *Config) Context() *holos.ClientContext
Context returns the ClientContext useful to get the OrgID and UserID for rpc calls.
func (*Config) TokenFlagSet ¶
type PlatformMutation ¶
type PlatformMutation struct { Name string DisplayName string // contains filtered or unexported fields }
func (*PlatformMutation) FlagSet ¶
func (pm *PlatformMutation) FlagSet() *flag.FlagSet