Documentation
¶
Overview ¶
Package pbclient is a minimal Portal Backend API client for CLI management commands.
Index ¶
- type ApplicationCollection
- type Client
- func (c *Client) CreateApplication(ctx context.Context, req *application.CreateApplicationRequest) (*application.ApplicationResponse, error)
- func (c *Client) CreateMember(ctx context.Context, req *member.CreateMemberRequest) (*member.MemberResponse, error)
- func (c *Client) CreateSchema(ctx context.Context, req *schema.CreateSchemaRequest) (*schema.SchemaResponse, error)
- func (c *Client) GetApplication(ctx context.Context, applicationID string) (*application.ApplicationResponse, error)
- func (c *Client) GetMember(ctx context.Context, memberID string) (*member.MemberResponse, error)
- func (c *Client) GetSchema(ctx context.Context, schemaID string) (*schema.SchemaResponse, error)
- func (c *Client) ListApplications(ctx context.Context, memberID *string) (*ApplicationCollection, error)
- func (c *Client) ListMembers(ctx context.Context, ouID *string) (*MemberCollection, error)
- func (c *Client) ListSchemaPolicyMetadata(ctx context.Context, schemaID string) (*PolicyMetadataCollection, error)
- func (c *Client) ListSchemas(ctx context.Context, memberID *string) (*SchemaCollection, error)
- func (c *Client) UpdateApplicationPolicy(ctx context.Context, applicationID string, ...) (*application.ApplicationResponse, error)
- type MemberCollection
- type PolicyMetadataCollection
- type SchemaCollection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationCollection ¶
type ApplicationCollection struct {
Items []application.ApplicationResponse `json:"items"`
Count int `json:"count"`
}
ApplicationCollection is the GET /api/v1/applications response envelope.
type Client ¶
Client calls the Portal Backend management API using a bearer token.
func (*Client) CreateApplication ¶
func (c *Client) CreateApplication(ctx context.Context, req *application.CreateApplicationRequest) (*application.ApplicationResponse, error)
CreateApplication calls POST /api/v1/applications.
func (*Client) CreateMember ¶
func (c *Client) CreateMember(ctx context.Context, req *member.CreateMemberRequest) (*member.MemberResponse, error)
CreateMember calls POST /api/v1/members.
func (*Client) CreateSchema ¶
func (c *Client) CreateSchema(ctx context.Context, req *schema.CreateSchemaRequest) (*schema.SchemaResponse, error)
CreateSchema calls POST /api/v1/schemas.
func (*Client) GetApplication ¶
func (c *Client) GetApplication(ctx context.Context, applicationID string) (*application.ApplicationResponse, error)
GetApplication calls GET /api/v1/applications/{applicationId}.
func (*Client) ListApplications ¶
func (c *Client) ListApplications(ctx context.Context, memberID *string) (*ApplicationCollection, error)
ListApplications calls GET /api/v1/applications, optionally filtered to one member's applications.
func (*Client) ListMembers ¶ added in v0.5.0
ListMembers calls GET /api/v1/members, optionally filtered to one organization unit's member.
func (*Client) ListSchemaPolicyMetadata ¶ added in v0.5.0
func (c *Client) ListSchemaPolicyMetadata(ctx context.Context, schemaID string) (*PolicyMetadataCollection, error)
ListSchemaPolicyMetadata calls GET /api/v1/schemas/{schemaId}/policy-metadata to list a schema's grantable fields.
func (*Client) ListSchemas ¶ added in v0.5.0
ListSchemas calls GET /api/v1/schemas, optionally filtered to one member's schemas.
func (*Client) UpdateApplicationPolicy ¶
func (c *Client) UpdateApplicationPolicy(ctx context.Context, applicationID string, req *application.UpdateApplicationPolicyRequest) (*application.ApplicationResponse, error)
UpdateApplicationPolicy calls PUT /api/v1/applications/{applicationId}/policy to replace an existing application's allow-list.
type MemberCollection ¶ added in v0.5.0
type MemberCollection struct {
Items []member.MemberResponse `json:"items"`
Count int `json:"count"`
}
MemberCollection is the GET /api/v1/members response envelope.
type PolicyMetadataCollection ¶ added in v0.5.0
type PolicyMetadataCollection struct {
Items []policy.PolicyMetadataResponse `json:"items"`
Count int `json:"count"`
}
PolicyMetadataCollection is the GET /api/v1/schemas/{schemaId}/policy-metadata response envelope.
type SchemaCollection ¶ added in v0.5.0
type SchemaCollection struct {
Items []schema.SchemaResponse `json:"items"`
Count int `json:"count"`
}
SchemaCollection is the GET /api/v1/schemas response envelope.