entities

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditLog

type AuditLog struct {
	Origin    string      `json:"origin"`
	Level     string      `json:"level"`
	Event     string      `json:"event"`
	Type      string      `json:"type"`
	User      string      `json:"user"`
	Timestamp int64       `json:"timestamp"`
	Message   interface{} `json:"message"`
}

type Cronjob

type Cronjob struct {
	Id               string              `json:"_id,omitempty"`
	Enabled          bool                `json:"enabled,omitempty"`
	Name             string              `json:"name,omitempty"`
	Description      string              `json:"description,omitempty"`
	Expression       string              `json:"expression,omitempty"`
	Target           string              `json:"targetUrl,omitempty"`
	Method           CronjobHttpMethod   `json:"httpMethod,omitempty"`
	AcceptInvalidSSL bool                `json:"acceptInvalidSSL,omitempty"`
	Timezone         string              `json:"timezone,omitempty"`
	Creator          ReducedUser         `json:"creator,omitempty"`
	CreateDate       int                 `json:"createDate,omitempty"`
	ModifyDate       int                 `json:"modifyDate,omitempty"`
	Space            string              `json:"space,omitempty"`
	Organization     ReducedOrganization `json:"organization,omitempty"`
	Headers          []CronjobHeader     `json:"headers,omitempty"`
	Body             string              `json:"body,omitempty"`
}

type CronjobCreation added in v0.0.21

type CronjobCreation struct {
	Name             string            `json:"name,omitempty"`
	Description      string            `json:"description,omitempty"`
	Expression       string            `json:"expression,omitempty"`
	Target           string            `json:"targetUrl,omitempty"`
	Method           CronjobHttpMethod `json:"httpMethod,omitempty"`
	AcceptInvalidSSL bool              `json:"acceptInvalidSSL,omitempty"`
	Timezone         string            `json:"timezone,omitempty"`
	Headers          []CronjobHeader   `json:"headers,omitempty"`
	Body             string            `json:"body,omitempty"`
	Enabled          bool              `json:"enabled,omitempty"`
}

type CronjobExpression added in v0.0.21

type CronjobExpression struct {
	Expression string `json:"expression"`
}

type CronjobHeader

type CronjobHeader struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type CronjobHttpMethod added in v0.0.21

type CronjobHttpMethod string
const (
	GET    CronjobHttpMethod = "GET"
	POST   CronjobHttpMethod = "POST"
	PUT    CronjobHttpMethod = "PUT"
	PATCH  CronjobHttpMethod = "PATCH"
	DELETE CronjobHttpMethod = "DELETE"
)

type CronjobInternal added in v0.0.21

type CronjobInternal struct {
	Id               string            `json:"_id,omitempty"`
	Enabled          bool              `json:"enabled,omitempty"`
	Name             string            `json:"name,omitempty"`
	Description      string            `json:"description,omitempty"`
	Expression       string            `json:"expression,omitempty"`
	Target           string            `json:"targetUrl,omitempty"`
	Method           CronjobHttpMethod `json:"httpMethod,omitempty"`
	AcceptInvalidSSL bool              `json:"acceptInvalidSSL,omitempty"`
	Timezone         string            `json:"timezone,omitempty"`
	Creator          ReducedUser       `json:"creator,omitempty"`
	CreateDate       int               `json:"createDate,omitempty"`
	ModifyDate       int               `json:"modifyDate,omitempty"`
	SpaceId          string            `json:"spaceId,omitempty"`
	OrganizationId   string            `json:"organizationId,omitempty"`
	Headers          []CronjobHeader   `json:"headers,omitempty"`
	Body             string            `json:"body,omitempty"`
}

type CronjobLog added in v0.0.21

type CronjobLog struct {
	Id           string              `json:"_id,omitempty"`
	CronjobId    string              `json:"cronjobId,omitempty"`
	StatusCode   int                 `json:"statusCode,omitempty"`
	Organization ReducedOrganization `json:"organization,omitempty"`
	Creator      ReducedUser         `json:"creator,omitempty"`
	App          string              `json:"app,omitempty"`
	Headers      []CronjobHeader     `json:"headers,omitempty"`
	Body         string              `json:"body,omitempty"`
	CreateDate   int                 `json:"createDate,omitempty"`
	ModifyDate   int                 `json:"modifyDate,omitempty"`
}

type CronjobLogCreation added in v0.0.21

type CronjobLogCreation struct {
	StatusCode int             `json:"statusCode,omitempty"`
	Headers    []CronjobHeader `json:"headers,omitempty"`
	Body       string          `json:"body,omitempty"`
}

type Event

type Event struct {
	Id           string              `json:"_id,omitempty"`
	Name         string              `json:"name,omitempty"`
	SpaceId      string              `json:"spaceId,omitempty"`
	Organization ReducedOrganization `json:"organization,omitempty"`
	Creator      ReducedUser         `json:"creator,omitempty"`
	CreateDate   int                 `json:"createDate,omitempty"` // UTC+0 unix timestamp
}

type EventCreation

type EventCreation struct {
	Name string `json:"name"`
}

type FuseSpace added in v0.0.21

type FuseSpace struct {
	*Space
}

type High5Space added in v0.0.21

type High5Space struct {
	*Space
}

type Login

type Login struct {
	Email    string `json:"email"`
	Password string `json:"password"`
	Totp     string `json:"totp,omitempty"`
}

type NatsPermissions

type NatsPermissions struct {
	Email       string `json:"email"`
	Permissions struct {
		Publish struct {
			Deny  []string `json:"deny"`
			Allow []string `json:"allow"`
		} `json:"publish"`
		Subscribe struct {
			Deny  []string `json:"deny"`
			Allow []string `json:"allow"`
		} `json:"subscribe"`
		Responses struct {
			Max int `json:"max"`
			TTL int `json:"ttl"`
		} `json:"responses"`
	} `json:"permissions"`
}

NatsPermissions represents a list of allowed subjects the active user token may subscribe / publish to after connection to nats

type OAuthApplication added in v0.0.21

type OAuthApplication struct {
	Id          string   `json:"_id"`
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Avatar      string   `json:"avatar"`
	Homepage    string   `json:"homepage"`
	Callback    []string `json:"callback"`

	ClientId     string                         `json:"clientId"`
	ClientSecret []OAuthApplicationClientSecret `json:"clientSecret"`

	Organization ReducedOrganization `json:"organization"`
	Creator      ReducedUser         `json:"creator"`
}

type OAuthApplicationClientSecret added in v0.0.21

type OAuthApplicationClientSecret struct {
	Id         string `json:"_id"`
	Name       string `json:"name"`
	Secret     string `json:"secret"`
	CreatorId  string `json:"creatorId"`
	Used       bool   `json:"used"`
	CreateDate int    `json:"createDate"`
	ModifyDate int    `json:"modifyDate"`
}

type OAuthApplicationClientSecretCreation added in v0.0.21

type OAuthApplicationClientSecretCreation struct {
	SecretName string `json:"secretName"`
}

type OAuthApplicationCreation added in v0.0.21

type OAuthApplicationCreation struct {
	*OAuthApplicationUpdate
	*OAuthApplicationClientSecretCreation
}

type OAuthApplicationUpdate added in v0.0.21

type OAuthApplicationUpdate struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Avatar      string   `json:"avatar"`
	Homepage    string   `json:"homepage"`
	Callback    []string `json:"callback"`
}

type Organization

type Organization struct {
	Id                 string                 `json:"_id,omitempty"`
	Name               string                 `json:"name,omitempty"`
	Creator            *User                  `json:"creator,omitempty"`
	Company            string                 `json:"company,omitempty"`
	IsUserOrganization bool                   `json:"isUserOrganization"`
	CreateDate         int                    `json:"createDate"`
	ModifyDate         int                    `json:"modifyDate"`
	Permission         OrganizationPermission `json:"permission,omitempty"`
}

type OrganizationMember

type OrganizationMember struct {
	Id             string                 `json:"_id"`
	OrganizationId string                 `json:"organizationId"`
	User           *User                  `json:"user"`
	Permission     OrganizationPermission `json:"permission"`
	CreateDate     int                    `json:"createDate"`
	ModifyDate     int                    `json:"modifyDate"`
}

type OrganizationMemberCreation added in v0.0.21

type OrganizationMemberCreation struct {
	Email      string                 `json:"email"`
	Permission OrganizationPermission `json:"permission"`
}

type OrganizationPermission

type OrganizationPermission string
const (
	ORGANIZATION_MEMBER OrganizationPermission = "MEMBER"
	ORGANIZATION_MANAGE OrganizationPermission = "MANAGE"
	ORGANIZATION_ADMIN  OrganizationPermission = "ADMIN"
	ORGANIZATION_OWNER  OrganizationPermission = "OWNER"
)

type PatchOrganizationMemberPermission added in v0.0.21

type PatchOrganizationMemberPermission struct {
	Permission OrganizationPermission `json:"permission"`
}

type PatchUser

type PatchUser struct {
	Name    string `json:"name,omitempty"`
	Email   string `json:"email,omitempty"`
	Company string `json:"company,omitempty"`
	// ActiveOrganization holds the name for the active organization, mainly being used within the web frontend
	// Changing this value makes all web frontend reload and act in the context of the new active organization
	ActiveOrganization string `json:"activeOrganization,omitempty"`
}

type PatchWebhook

type PatchWebhook struct {
	Name            string                 `json:"name"`
	Event           string                 `json:"event"`
	Target          string                 `json:"target"`
	SecurityHeaders WebhookSecurityHeaders `json:"securityHeaders,omitempty"`
}

type Permission

type Permission struct {
	UserId     string          `json:"userId,omitempty"`
	Permission SpacePermission `json:"permission,omitempty"`
}

func (Permission) String

func (p Permission) String() string

type ReducedOrganization added in v0.0.21

type ReducedOrganization struct {
	Id   string `json:"_id,omitempty"`
	Name string `json:"name,omitempty"`
}

type ReducedUser added in v0.0.21

type ReducedUser struct {
	Id   string `json:"_id,omitempty"`
	Name string `json:"name,omitempty"`
}

type Register

type Register struct {
	Name     string `json:"name"`
	Company  string `json:"company,omitempty"`
	Email    string `json:"email"`
	Password string `json:"password"`
	Captcha  string `json:"captcha"`
}

type RegisterVerify

type RegisterVerify struct {
	Email            string `json:"email"`
	VerificationCode string `json:"verificationCode"`
}

type Scope added in v0.0.21

type Scope string
const (
	HCLOUD_FULL             Scope = "hcloud:full"
	IDP_EMAIL_READ          Scope = "idp:email:read"
	IDP_USER_READ           Scope = "idp:user:read"
	IDP_USER_WRITE          Scope = "idp:user:write"
	IDP_USER_DELETE         Scope = "idp:user:delete"
	IDP_ORGANIZATION_READ   Scope = "idp:organization:read"
	IDP_ORGANIZATION_WRITE  Scope = "idp:organization:write"
	IDP_ORGANIZATION_DELETE Scope = "idp:organization:delete"
	HIGH5_APP_READ          Scope = "high5:app:read"
	HIGH5_APP_EXECUTE       Scope = "high5:app:execute"
	HIGH5_APP_WRITE         Scope = "high5:app:write"
	HIGH5_APP_DELETE        Scope = "high5:app:delete"
	FUSE_APP_READ           Scope = "fuse:app:read"
	FUSE_APP_EXECUTE        Scope = "fuse:app:execute"
	FUSE_APP_WRITE          Scope = "fuse:app:write"
	FUSE_APP_DELETE         Scope = "fuse:app:delete"
)

type SearchDateFilter

type SearchDateFilter struct {
	Date     int                `json:"date"`
	Operator SearchDateOperator `json:"searchDateOperator"`
}

type SearchDateOperator

type SearchDateOperator string
const (
	EQ  SearchDateOperator = "$eq"
	NE  SearchDateOperator = "$ne"
	GTE SearchDateOperator = "$gte"
	GT  SearchDateOperator = "$gt"
	LTE SearchDateOperator = "$lte"
	LT  SearchDateOperator = "$lt"
)

type SearchOrganizationFilter

type SearchOrganizationFilter struct {
	Name               string           `json:"name,omitempty"`
	CreatorId          string           `json:"creatorId,omitempty"`
	Company            string           `json:"company,omitempty"`
	IsUserOrganization bool             `json:"isUserOrganization,omitempty"`
	CreateDateFilter   SearchDateFilter `json:"createDateFilter,omitempty"`
	ModifyDateFilter   SearchDateFilter `json:"modifyDateFilter,omitempty"`
}

type Space added in v0.0.21

type Space struct {
	Id           string              `json:"_id,omitempty"`
	Name         string              `json:"name,omitempty"`
	Permissions  []Permission        `json:"permissions,omitempty"`
	Organization ReducedOrganization `json:"organization,omitempty"`
	Creator      ReducedUser         `json:"creator,omitempty"`
	CreateDate   int                 `json:"createDate,omitempty"` // UTC+0 unix timestamp
}

type SpaceCreation added in v0.0.21

type SpaceCreation struct {
	Name string `json:"name"`
}

type SpacePermission added in v0.0.21

type SpacePermission string
const (
	NONE    SpacePermission = "NONE"
	READ    SpacePermission = "READ"
	EXECUTE SpacePermission = "EXECUTE"
	WRITE   SpacePermission = "WRITE"
	MANAGE  SpacePermission = "MANAGE"
	OWNER   SpacePermission = "OWNER"
)

type SpacePermissionPatch added in v0.0.21

type SpacePermissionPatch struct {
	UserId string `json:"userId"`
	// Use AppPermission.NONE to remove access
	Permission SpacePermission `json:"permission"`
}

type Stream

type Stream struct {
	Id           string              `json:"_id,omitempty"`
	Name         string              `json:"name,omitempty"`
	EventId      string              `json:"eventId,omitempty"`
	SpaceId      string              `json:"spaceId,omitempty"`
	Order        int                 `json:"order,omitempty"`
	Organization ReducedOrganization `json:"organization,omitempty"`
	Creator      ReducedUser         `json:"creator,omitempty"`
	CreateDate   int                 `json:"createDate,omitempty"` // UTC+0 unix timestamp
}

type StreamCreation

type StreamCreation struct {
	Name string `json:"name"`
}

type StreamExecutionPayload

type StreamExecutionPayload struct {
	Type StreamPayloadType `json:"type"`
	Data string            `json:"data"`
}

type StreamExecutionRequest

type StreamExecutionRequest struct {
	Target        string                 `json:"target"`
	Payload       StreamExecutionPayload `json:"payload"`
	Timeout       int                    `json:"timeout"`
	WaitForResult bool                   `json:"waitForResult"`
}

type StreamOrder

type StreamOrder struct {
	StreamId string `json:"streamId"`
	Order    int    `json:"order"`
}

type StreamPayloadType

type StreamPayloadType string
const (
	JSON    StreamPayloadType = "json"
	GENERIC StreamPayloadType = "generic"
)

type StreamResult

type StreamResult struct {
	Failed  bool   `json:"failed"`
	Message string `json:"message"`
}

type TOTP added in v0.0.21

type TOTP struct {
	Activated  bool   `json:"activated"`
	OTPAuthUrl string `json:"otpAuthUrl"`
	QRCode     string `json:"qrcode"`
	CreateDate int    `json:"createDate"`
	ModifyDate int    `json:"modifyDate"`
}

type TOTPActivated added in v0.0.21

type TOTPActivated struct {
	Activated    bool     `json:"activated"`
	RecoverCodes []string `json:"recoverCode"`
	CreateDate   int      `json:"createDate"`
	ModifyDate   int      `json:"modifyDate"`
}

type TOTPToken added in v0.0.21

type TOTPToken struct {
	Token string `json:"token"`
}

type Team added in v0.0.21

type Team struct {
	Id           string              `json:"_id"`
	Name         string              `json:"name"`
	Organization ReducedOrganization `json:"organization"`
	Users        []string            `json:"users"`
	CreateDate   int                 `json:"createDate"`
	ModifyDate   int                 `json:"modifyDate"`
}

type TeamCreation added in v0.0.21

type TeamCreation struct {
	Name  string   `json:"name"`
	Users []string `json:"users"`
}

type TeamPatch added in v0.0.21

type TeamPatch struct {
	Name          string                 `json:"name"`
	Users         []string               `json:"users"`
	UserOperation TeamPatchUserOperation `json:"userOperation"`
}

type TeamPatchUserOperation added in v0.0.21

type TeamPatchUserOperation string
const (
	ADD    TeamPatchUserOperation = "ADD"
	REMOVE TeamPatchUserOperation = "REMOVE"
	SET    TeamPatchUserOperation = "SET"
)

type Token

type Token struct {
	Token string `json:"token"`
}

type Total

type Total int

Total represents the total amount of entities that exist in a paginated request

type User

type User struct {
	Id                 string `json:"_id"`
	Name               string `json:"name"`
	Email              string `json:"email"`
	Company            string `json:"company,omitempty"`
	ActiveOrganization string `json:"activeOrganization"`
}

type UserEmail

type UserEmail struct {
	Email string `json:"email"`
}

type UserPat added in v0.0.21

type UserPat struct {
	Id         string      `json:"_id"`
	Name       string      `json:"name"`
	Expiration int         `json:"expiration"`
	ModifyDate int         `json:"modifyDate"`
	Scopes     []Scope     `json:"scopes"`
	Type       UserPatType `json:"type"`
	UserId     string      `json:"userId"`
}

type UserPatCreation added in v0.0.21

type UserPatCreation struct {
	Name       string  `json:"name"`
	Expiration int     `json:"expiration"`
	Scopes     []Scope `json:"scopes"`
}

type UserPatPatch added in v0.0.21

type UserPatPatch struct {
	Name   string  `json:"name"`
	Scopes []Scope `json:"scopes"`
}

type UserPatType added in v0.0.21

type UserPatType string
const (
	PAT   UserPatType = "PAT"
	OAUTH UserPatType = "OAUTH"
)

type Version

type Version struct {
	Version string `json:"version"`
}

func (Version) String

func (v Version) String() string

type Webhook

type Webhook struct {
	Id              string                 `json:"_id,omitempty"`
	Name            string                 `json:"name,omitempty"`
	Url             string                 `json:"url,omitempty"`
	Target          string                 `json:"target"`
	SecurityHeaders WebhookSecurityHeaders `json:"securityHeaders,omitempty"`
	SpaceId         string                 `json:"spaceId,omitempty"`
	EventId         string                 `json:"eventId,omitempty"`
	Organization    ReducedOrganization    `json:"organization,omitempty"`
	Creator         ReducedUser            `json:"creator,omitempty"`
	CreateDate      int                    `json:"createDate,omitempty"` // UTC+0 unix timestamp
	ModifyDate      int                    `json:"modifyDate,omitempty"` // UTC+0 unix timestamp
}

type WebhookCreation

type WebhookCreation struct {
	Name            string                 `json:"name"`
	Event           string                 `json:"event"`
	Target          string                 `json:"target"`
	SecurityHeaders WebhookSecurityHeaders `json:"securityHeaders,omitempty"`
}

type WebhookLog

type WebhookLog struct {
	Id                 string      `json:"_id,omitempty"`
	WebhookId          string      `json:"webhookId,omitempty"`
	SpaceId            string      `json:"spaceId,omitempty"`
	EventId            string      `json:"eventId,omitempty"`
	OrganizationId     string      `json:"organizationId,omitempty"`
	SourceIP           string      `json:"sourceIp,omitempty"`
	CompleteHeader     interface{} `json:"completeHeader,omitempty"`
	RequestBody        interface{} `json:"requestBody,omitempty"`
	ResponseBody       interface{} `json:"responseBody,omitempty"`
	ResponseStatusCode int         `json:"responseStatusCode,omitempty"`
	Timestamp          int         `json:"timestamp,omitempty"`  // UTC+0 unix timestamp
	CreateDate         int         `json:"createDate,omitempty"` // UTC+0 unix timestamp
	ModifyDate         int         `json:"modifyDate,omitempty"` // UTC+0 unix timestamp
}

type WebhookSecurityHeaders

type WebhookSecurityHeaders struct {
}

Jump to

Keyboard shortcuts

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