model

package
v0.0.0-...-e1cdcfb Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIObject

type APIObject struct {
	Type                string `json:"type,omitempty" yaml:"type,omitempty"`
	URL                 string `json:"url,omitempty" yaml:"url,omitempty"`
	IsUserAuthenticated bool   `json:"is_user_authenticated,omitempty" yaml:"is_user_authenticated,omitempty"`
}

type AiPlugin

type AiPlugin struct {
	SchemaVersion       string       `json:"schema_version,omitempty" yaml:"schema_version,omitempty"`
	NameForModel        string       `json:"name_for_model,omitempty" yaml:"name_for_model,omitempty"`
	NameForHuman        string       `json:"name_for_human,omitempty" yaml:"name_for_human,omitempty"`
	DescriptionForModel string       `json:"description_for_model,omitempty" yaml:"description_for_model,omitempty"`
	DescriptionForHuman string       `json:"description_for_human,omitempty" yaml:"description_for_human,omitempty"`
	Auth                ManifestAuth `json:"auth,omitempty" yaml:"auth,omitempty"`
	API                 APIObject    `json:"api,omitempty" yaml:"api,omitempty"`
	LogoURL             string       `json:"logo_url,omitempty" yaml:"logo_url,omitempty"`
	ContactEmail        string       `json:"contact_email,omitempty" yaml:"contact_email,omitempty"`
	LegalInfoURL        string       `json:"legal_info_url,omitempty" yaml:"legal_info_url,omitempty"`
}

AiPlugin is the model of ai plugin.

type HTTPAuthorizationType

type HTTPAuthorizationType string
const (
	Bearer HTTPAuthorizationType = "bearer"
	Basic  HTTPAuthorizationType = "basic"
)

type ManifestAuth

type ManifestAuth struct {
	Type ManifestAuthType `json:"type,omitempty" yaml:"type,omitempty"`
}

type ManifestAuthType

type ManifestAuthType string
const (
	None        ManifestAuthType = "none"
	UserHTTP    ManifestAuthType = "user_http"
	ServiceHTTP ManifestAuthType = "service_http"
	OaAuth      ManifestAuthType = "oauth"
)

type OrderBy

type OrderBy int32

OrderBy determines the data list order.

const (
	// Desc stands for descending order.
	Desc OrderBy = 0
	// Asc stands for ascending order.
	Asc OrderBy = 1
)

type OrganizationType

type OrganizationType string
const (
	// OrganizationTypeUser is this plugin user organization type.
	OrganizationTypeUser OrganizationType = "user"
	// OrganizationTypeTeam is this plugin team organization type.
	OrganizationTypeTeam OrganizationType = "team"
)

func (OrganizationType) String

func (ot OrganizationType) String() string

type Page

type Page struct {
	// Page is current page.
	Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	// pageSize is the data number shown per page.
	PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
	// Total is the total number of referents.
	Total int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
	// Pages is the number of pages.
	Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"`
}

Page is for data paging.

type Plugin

type Plugin struct {
	ID           int      `gorm:"column:id" db:"id" json:"id" form:"id"`
	Domain       string   `gorm:"column:domain" db:"domain" json:"domain" form:"domain"`
	Name         string   `gorm:"column:name" db:"name" json:"name" form:"name"`
	Description  string   `gorm:"column:description" db:"description" json:"description" form:"description"`
	AuthType     string   `gorm:"column:auth_type" db:"auth_type" json:"auth_type" form:"auth_type"`
	LogoURL      string   `gorm:"column:logo_url" db:"logo_url" json:"logo_url" form:"logo_url"`
	ContactEmail string   `gorm:"column:contact_email" db:"contact_email" json:"contact_email" form:"contact_email"`
	Organization string   `gorm:"column:organization" db:"organization" json:"organization" form:"organization"`
	APIType      string   `gorm:"column:api_type" db:"api_type" json:"api_type" form:"api_type"`
	APIURL       string   `gorm:"column:api_url" db:"api_url" json:"api_url" form:"api_url"`
	Label        []string `gorm:"column:label" db:"label" json:"label" form:"label"`
	State        string   `gorm:"column:state" db:"state" json:"state" form:"state"`
	InstallNum   int      `gorm:"column:install_num" db:"install_num" json:"install_num" form:"install_num"`
	Score        float64  `gorm:"column:score" db:"score" json:"score" form:"score"`
	Heat         int      `gorm:"column:heat" db:"heat" json:"heat" form:"heat"`
	CreatedAt    string   `gorm:"column:created_at" db:"created_at" json:"created_at" form:"created_at"`
	UpdatedAt    string   `gorm:"column:updated_at" db:"updated_at" json:"updated_at" form:"updated_at"`
}

Plugin is the model for plugin table.

type PluginMetadata

type PluginMetadata struct {
	ID                    int64  `gorm:"column:id" db:"id" json:"id" form:"id"`
	PluginID              int    `gorm:"column:plugin_id" db:"plugin_id" json:"plugin_id" form:"plugin_id"`
	PluginAPIEtag         string `gorm:"column:plugin_api_etag" db:"plugin_api_etag" json:"plugin_api_etag" form:"plugin_api_etag"`
	PluginAPILastModified string `` /* 132-byte string literal not displayed */
	PluginSchema          string `gorm:"column:plugin_schema" db:"plugin_schema" json:"plugin_schema" form:"plugin_schema"`
	PluginAPI             string `gorm:"column:plugin_api" db:"plugin_api" json:"plugin_api" form:"plugin_api"`
	CreateAt              string `gorm:"column:create_at" db:"create_at" json:"create_at" form:"create_at"`
	UpdateAt              string `gorm:"column:update_at" db:"update_at" json:"update_at" form:"update_at"`
}

type PluginScore

type PluginScore struct {
	ID        int     `gorm:"column:id" db:"id" json:"id" form:"id"`
	PluginID  int     `gorm:"column:plugin_id" db:"plugin_id" json:"plugin_id" form:"plugin_id"`
	Score     float64 `gorm:"column:score" db:"score" json:"score" form:"score"`
	Comments  string  `gorm:"column:comments" db:"comments" json:"comments" form:"comments"`
	UserID    int     `gorm:"column:user_id" db:"user_id" json:"user_id" form:"user_id"`
	CreatedAt string  `gorm:"column:created_at" db:"created_at" json:"created_at" form:"created_at"`
	UpdatedAt string  `gorm:"column:updated_at" db:"updated_at" json:"updated_at" form:"updated_at"`
}

PluginScore is the model for plugin_score table.

type Rating

type Rating struct {
	Value float64
	Count int
}

Rating is computed rating for a plugin.

type SortBy

type SortBy string

SortBy determines the data list order reference.

type StateType

type StateType string
const (
	// StateTypePublished is this plugin publish state.
	StateTypePublished StateType = "published"
	// StateTypeUnPublished is this plugin unpublish state.
	StateTypeUnPublished StateType = "unpublished"
)

func (StateType) String

func (st StateType) String() string

Jump to

Keyboard shortcuts

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