models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 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 ExampleOrganizationSuccessRequest = OrganizationRequest{
	Name: "MITB Inc.",
}

ExampleOrganizationSuccessRequest is an example of a successful organization request for OpenAPI documentation

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

ExampleOrganizationSuccessResponse is an example of a successful organization 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 OrganizationReply

type OrganizationReply 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"`
}

OrganizationReply is the response object for creating a organization

type OrganizationRequest

type OrganizationRequest 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]"`
}

OrganizationRequest is the request object for creating a organization

func (*OrganizationRequest) Validate

func (r *OrganizationRequest) Validate() error

Validate ensures the required fields are set on the OrganizationRequest request

type Relationship

type Relationship struct {
	OrgDetails
}

Jump to

Keyboard shortcuts

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