models

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package models provides http request and response structs

Index

Constants

This section is empty.

Variables

View Source
var ExampleWorkspaceSuccessRequest = WorkspaceRequest{
	Name: "MITB Inc.",
}

ExampleWorkspaceSuccessRequest is an example of a successful workspace request for OpenAPI documentation

View Source
var ExampleWorkspaceSuccessResponse = WorkspaceReply{
	Reply: rout.Reply{Success: true},
	ID:    "1234",
	Name:  "MITB Inc.",
}

ExampleWorkspaceSuccessResponse is an example of a successful workspace response for OpenAPI documentation

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	OrgDetails
	Relations []Relationship `json:"relations,omitempty"`
}

type Environment

type Environment struct {
	OrgDetails
	Buckets []Bucket `json:"buckets,omitempty"`
}

type OrgDetails

type OrgDetails struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Relationship

type Relationship struct {
	OrgDetails
}

type WorkspaceReply

type WorkspaceReply struct {
	rout.Reply
	ID           string        `json:"id"`
	Name         string        `json:"name"`
	Description  string        `json:"description,omitempty"`
	Domains      []string      `json:"domains,omitempty"`
	Environments []Environment `json:"environments,omitempty"`
}

WorkspaceReply is the response object for creating a workspace

type WorkspaceRequest

type WorkspaceRequest struct {
	Name          string   `json:"name"`
	Description   string   `json:"description,omitempty"`
	Domains       []string `json:"domains,omitempty"`
	Environments  []string `json:"environments,omitempty" default:"[production,testing]"`
	Buckets       []string `json:"buckets,omitempty" default:"[assets,customers,orders,relationships,sales]"`
	Relationships []string `json:"relationships,omitempty" default:"[internal_users,marketing_subscribers,marketplaces,partners,vendors]"`
}

WorkspaceRequest is the request object for creating a workspace

func (*WorkspaceRequest) Validate

func (r *WorkspaceRequest) Validate() error

Validate ensures the required fields are set on the WorkspaceRequest request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL