design

package
v0.4.20 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BadRequestError = dsl.Type("BadRequestError", func() {
	dsl.Attribute("message", dsl.String, "Error message", func() {
		dsl.Example("The request was invalid.")
	})
	dsl.Required("message")
})

BadRequestError is the DSL type for a bad request error.

View Source
var InternalServerError = dsl.Type("InternalServerError", func() {
	dsl.Attribute("message", dsl.String, "Error message", func() {
		dsl.Example("An internal server error occurred.")
	})
	dsl.Required("message")
})

InternalServerError is the DSL type for an internal server error.

View Source
var JWTAuth = dsl.JWTSecurity("jwt", func() {
	dsl.Description("Heimdall authorization")
})
View Source
var NotFoundError = dsl.Type("NotFoundError", func() {
	dsl.Attribute("message", dsl.String, "Error message", func() {
		dsl.Example("The requested resource was not found.")
	})
	dsl.Required("message")
})

NotFoundError is the DSL type for a not found error.

View Source
var Organization = dsl.Type("Organization", func() {
	dsl.Description("An organization is a universal representation of an LFX API organization.")

	dsl.Attribute("name", dsl.String, "Organization name", func() {
		dsl.Example("Linux Foundation")
	})
	dsl.Attribute("domain", dsl.String, "Organization domain", func() {
		dsl.Example("linuxfoundation.org")
	})
	dsl.Attribute("industry", dsl.String, "Organization industry classification", func() {
		dsl.Example("Non-Profit")
	})
	dsl.Attribute("sector", dsl.String, "Business sector classification", func() {
		dsl.Example("Technology")
	})
	dsl.Attribute("employees", dsl.String, "Employee count or range", func() {
		dsl.Example("100-499")
	})
})
View Source
var OrganizationSuggestion = dsl.Type("OrganizationSuggestion", func() {
	dsl.Description("An organization suggestion for the search.")

	dsl.Attribute("name", dsl.String, "Organization name", func() {
		dsl.Example("Linux Foundation")
	})
	dsl.Attribute("domain", dsl.String, "Organization domain", func() {
		dsl.Example("linuxfoundation.org")
	})
	dsl.Attribute("logo", dsl.String, "Organization logo URL", func() {
		dsl.Example("https://example.com/logo.png")
	})
	dsl.Required("name", "domain")
})
View Source
var Resource = dsl.Type("Resource", func() {
	dsl.Description("A resource is a universal representation of an LFX API resource for indexing.")

	dsl.Attribute("type", dsl.String, "Resource type", func() {
		dsl.Example("committee")
	})
	dsl.Attribute("id", dsl.String, "Resource ID (within its resource collection)", func() {
		dsl.Example("123")
	})
	dsl.Attribute("data", dsl.Any, "Resource data snapshot", func() {
		dsl.Example(CommitteeExampleStub{
			ID:          "123",
			Name:        "My committee",
			Description: "a committee",
		})
	})
})
View Source
var ServiceUnavailableError = dsl.Type("ServiceUnavailableError", func() {
	dsl.Attribute("message", dsl.String, "Error message", func() {
		dsl.Example("The service is unavailable.")
	})
	dsl.Required("message")
})

ServiceUnavailableError is the DSL type for a service unavailable error.

View Source
var SortValues = []any{
	"name_asc",
	"name_desc",

	"updated_asc",
	"updated_desc",

	"best_match",
}
View Source
var Sortable = dsl.Type("Sortable", func() {
	dsl.Attribute("sort", dsl.String, "Sort order for results", func() {
		dsl.Enum(SortValues...)
		dsl.Default("name_asc")
		dsl.Example("updated_desc")
	})
	dsl.Attribute("page_token", dsl.String, "Opaque token for pagination", func() {
		dsl.Example("****")
	})
	dsl.Attribute("page_size", dsl.Int, "Number of results per page", func() {
		dsl.Minimum(1)
		dsl.Maximum(1000)
		dsl.Default(50)
		dsl.Example(20)
	})
})

Functions

This section is empty.

Types

type CommitteeExampleStub

type CommitteeExampleStub struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

Define an example cached LFX resource for the nested "data" attribute for resource searches. This example happens to be a committee to match the example value of "committee" for the "type" attribute of Resource.

Jump to

Keyboard shortcuts

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