model

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// APIErrBadRequest represents an HTTP 400 error
	APIErrBadRequest = errors.New("bad request")
	// APIErrSystemUnavailable represents an hTTP 5xx error
	APIErrSystemUnavailable = errors.New("system unavailable")
	// APIErrUnauthorized represents an HTTP 401 error
	APIErrUnauthorized = errors.New("unauthorized")
)

Functions

This section is empty.

Types

type APIErrorResponse

type APIErrorResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
	Err     error
}

APIErrorResponse represents a body of the shape: {"success":false,"message":"error message"}

func (*APIErrorResponse) Error

func (e *APIErrorResponse) Error() string

Error implements the error interface

type APIResponse

type APIResponse struct {
	Success  bool   `json:"success"`
	Message  string `json:"message"`
	Revision int64  `json:"revision"`
}

APIResponse represents a response from structurizr

type Workspace

type Workspace struct {
	ID           int64  `json:"id"`
	Name         string `json:"name"`
	Description  string `json:"description"`
	APIKey       string `json:"apiKey"`
	APISecret    string `json:"apiSecret"`
	PublicURL    string `json:"publicUrl"`
	PrivateURL   string `json:"privateUrl"`
	ShareableURL string `json:"shareableUrl"`
}

Workspace represents a workspace configured in the structurizr

type Workspaces

type Workspaces struct {
	Workspaces []*Workspace `json:"workspaces"`
}

Workspaces is the response body for any CRU methods

func (*Workspaces) FindByID

func (w *Workspaces) FindByID(id any) *Workspace

FindByID returns a workspace by its ID

Jump to

Keyboard shortcuts

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