models

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Copyright © 2022 Websublime.dev organization@websublime.dev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2022 Websublime.dev organization@websublime.dev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2022 Websublime.dev organization@websublime.dev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2022 Websublime.dev organization@websublime.dev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2022 Websublime.dev organization@websublime.dev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2022 Websublime.dev organization@websublime.dev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2022 Websublime.dev organization@websublime.dev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2022 Websublime.dev organization@websublime.dev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright © 2022 Websublime.dev organization@websublime.dev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromptGetInput

func PromptGetInput(content PromptContent, length int) (string, error)

func PromptGetSelect

func PromptGetSelect(content PromptSelectContent) (int, string, error)

Types

type ApiExtractorFileProps

type ApiExtractorFileProps struct {
	Name string
}

type ArtifactsYamlFileProps

type ArtifactsYamlFileProps struct {
	Version string
}

type AuthorFileProps

type AuthorFileProps struct {
	Name     string `json:"name"`
	Username string `json:"username"`
	Email    string `json:"email"`
	Token    string `json:"token"`
	ID       string `json:"id"`
	Expire   int64  `json:"expire"`
	Refresh  string `json:"refresh"`
}

type Bucket

type Bucket struct {
	ID        string `json:"id,omitempty"`
	Name      string `json:"name"`
	Public    bool   `json:"public"`
	Owner     string `json:"owner,omitempty"`
	CreatedAt string `json:"created_at,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty"`
}

func NewBucket

func NewBucket(name string, id string, public bool) *Bucket

type BucketUpload

type BucketUpload struct {
	Key string `json:"key"`
}

type Login

type Login struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

func NewLogin

func NewLogin(email string, password string) *Login

type LoginResponse

type LoginResponse struct {
	Token        string `json:"access_token"`
	TokenType    string `json:"token_type"`
	Expires      int64  `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	CreatedAt    string `json:"created_at"`
}

type Organization

type Organization struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	CreatedAt string `json:"created_at"`
}

func NewOrganization

func NewOrganization(name string) *Organization

type OrganizationByUserResponse

type OrganizationByUserResponse struct {
	Organization Organization `json:"organization"`
}

type Package

type Package struct {
	ID          string             `json:"id,omitempty"`
	Name        string             `json:"name,omitempty"`
	Type        utils.PackageType  `json:"type,omitempty"`
	Description string             `json:"description,omitempty"`
	WorkspaceID string             `json:"workspace_id,omitempty"`
	Version     string             `json:"version,omitempty"`
	Template    utils.TemplateType `json:"template,omitempty"`
	CreatedAt   string             `json:"created_at,omitempty"`
	CreatedBy   string             `json:"created_by,omitempty"`
}

func NewPackage

func NewPackage(name string, description string, types utils.PackageType, template utils.TemplateType, workspaceID string) *Package

type PackageJson

type PackageJson struct {
	Name            string            `json:"name"`
	Version         string            `json:"version"`
	Description     string            `json:"description"`
	Main            string            `json:"main"`
	Typings         string            `json:"typings"`
	Module          string            `json:"module"`
	Scripts         map[string]string `json:"scripts"`
	Keywords        []string          `json:"keywords"`
	Author          string            `json:"author"`
	License         string            `json:"license"`
	Dependencies    map[string]string `json:"dependencies"`
	DevDependencies map[string]string `json:"devDependencies"`
}

type PackageJsonFileProps

type PackageJsonFileProps struct {
	Name      string
	Namespace string
	Repo      string
	Username  string
	Email     string
	Version   string
	Scope     string
	Type      string
}

type PromptContent

type PromptContent struct {
	Error   string `json:"error,omitempty"`
	Label   string `json:"label,omitempty"`
	Default string `json:"default,omitempty"`
	Hide    bool   `json:"hide,omitempty"`
	Mask    rune   `json:"mask,omitempty"`
}

type PromptSelectContent

type PromptSelectContent struct {
	Label string   `json:"label"`
	Items []string `json:"items"`
}

type ReadmeFileProps

type ReadmeFileProps struct {
	Name         string
	Repo         string
	Organization string
}

type Refresh

type Refresh struct {
	Token string `json:"refresh_token"`
}

func NewRefresh

func NewRefresh(token string) *Refresh

type RefreshResponse

type RefreshResponse struct {
	Token        string `json:"access_token"`
	Type         string `json:"token_type"`
	Expires      int64  `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
}

type ReleaseYamlFileProps

type ReleaseYamlFileProps struct {
	Username string
	Email    string
	Scope    string
}

type Sign

type Sign struct {
	Email    string   `json:"email"`
	Password string   `json:"password"`
	Data     SignData `json:"data"`
}

func NewSignUp

func NewSignUp(email string, password string, name string, username string) *Sign

type SignData

type SignData struct {
	Name   string `json:"name"`
	Author string `json:"author"`
}

type SignResponse

type SignResponse struct {
	ID             string `json:"id"`
	Aud            string `json:"aud"`
	Role           string `json:"role"`
	Email          string `json:"email"`
	Phone          string `json:"phone"`
	ConfirmationAt string `json:"confirmation_sent_at"`
	AppMetadata    struct {
		Provider  string   `json:"provider"`
		Providers []string `json:"providers"`
	} `json:"app_metadata"`
	UserMetadata struct {
		Author string `json:"author"`
		Name   string `json:"name"`
	} `json:"user_metadata"`
	Identities []struct {
		ID           string `json:"id"`
		UserID       string `json:"user_id"`
		IdentityData struct {
			Sub string `json:"sub"`
		} `json:"identity_data"`
		Provider   string `json:"provider"`
		LastSignAt string `json:"last_sign_in_at"`
		CreatedAt  string `json:"created_at"`
	} `json:"identities"`
}

type SnapshotsYamlFileProps added in v0.1.9

type SnapshotsYamlFileProps struct {
	Version string
}

type SublimeJsonFileProps

type SublimeJsonFileProps struct {
	Name         string            `json:"name"`
	Repo         string            `json:"repo"`
	Namespace    string            `json:"namespace"`
	Root         string            `json:"root"`
	Organization string            `json:"organization"`
	ID           string            `json:"id"`
	Description  string            `json:"description"`
	Packages     []SublimePackages `json:"packages"`
}

type SublimePackages

type SublimePackages struct {
	ID          string            `json:"id"`
	Name        string            `json:"name"`
	Scope       string            `json:"scope"`
	Type        utils.PackageType `json:"type"`
	Description string            `json:"description"`
}

type SublimeViperProps

type SublimeViperProps struct {
	Name         string            `mapstructure:"name"`
	Repo         string            `mapstructure:"repo"`
	Namespace    string            `mapstructure:"namespace"`
	Root         string            `mapstructure:"root"`
	Organization string            `mapstructure:"organization"`
	ID           string            `mapstructure:"id"`
	Description  string            `mapstructure:"description"`
	Packages     []SublimePackages `mapstructure:"packages"`
}

type TsConfigJsonFileProps

type TsConfigJsonFileProps struct {
	Namespace string
	Vite      string
}

type TsConfigReferences

type TsConfigReferences struct {
	Path string `json:"path"`
	Name string `json:"name"`
}

type TsconfigBase

type TsconfigBase struct {
	CompilerOptions TsconfigCompilerOptions `json:"compilerOptions"`
	References      []TsConfigReferences    `json:"references"`
	Exclude         []string                `json:"exclude"`
}

type TsconfigCompilerOptions

type TsconfigCompilerOptions struct {
	Target                  string `json:"target"`
	UseDefineForClassFields bool   `json:"useDefineForClassFields"`
	Module                  string `json:"module"`
	ModuleResolution        string `json:"moduleResolution"`
	Strict                  bool   `json:"strict"`
	SourceMap               bool   `json:"sourceMap"`
	ResolveJsonModule       bool   `json:"resolveJsonModule"`
	EsModuleInterop         bool   `json:"esModuleInterop"`
	Declaration             bool   `json:"declaration"`
	SkipLibCheck            bool   `json:"skipLibCheck"`
	Composite               bool   `json:"composite"`
	Incremental             bool   `json:"incremental"`
}

type User added in v0.1.2

type User struct {
	EmailConfirmedAt string `json:"email_confirmed_at"`
	Phone            string `json:"phone"`
	LastSignInAt     string `json:"last_sign_in_at"`
	Identities       []struct {
		ID     string `json:"id"`
		UserID string `json:"user_id"`
	} `json:"identities"`
	ConfirmedAt  string `json:"confirmed_at"`
	Email        string `json:"email"`
	UserMetadata struct {
		Author string `json:"author"`
		Name   string `json:"name"`
	} `json:"user_metadata"`
	ID   string `json:"id"`
	Role string `json:"role"`
}

type ViteJsonFileProps

type ViteJsonFileProps struct {
	Namespace string
	Scope     string
	Name      string
}

type Workspace

type Workspace struct {
	ID             string `json:"id,omitempty"`
	Name           string `json:"name,omitempty"`
	Repo           string `json:"repo,omitempty"`
	Description    string `json:"description,omitempty"`
	OrganizationID string `json:"organization_id,omitempty"`
	Private        bool   `json:"private,omitempty"`
}

func NewWorkspace

func NewWorkspace(name string, repo string, description string, orgID string) *Workspace

type WorkspacesByOrganizationResponse

type WorkspacesByOrganizationResponse struct {
	ID             string `json:"id,omitempty"`
	Name           string `json:"name,omitempty"`
	Repo           string `json:"repo,omitempty"`
	Description    string `json:"description,omitempty"`
	OrganizationID string `json:"organization_id,omitempty"`
	Private        bool   `json:"private,omitempty"`
	CreatedAt      string `json:"created_at,omitempty"`
	CreatedBy      string `json:"created_by,omitempty"`
}

Jump to

Keyboard shortcuts

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