blox

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ProfileCue = `` /* 448-byte string literal not displayed */

Variables

View Source
var Models = []Model{
	{
		ID:         "profile",
		Name:       "Profile",
		Folder:     "profiles",
		ForeignKey: "profile_id",
		Cue:        ProfileCue,
	},
}

Models is used by various commands to determine how to perform certain actions based on arguments and flags provided. All new types must be represented in this slice.

Functions

This section is empty.

Types

type Model

type Model struct {
	ID         string
	Name       string
	Folder     string
	ForeignKey string
	Cue        string
}

func GetModel

func GetModel(id string) (Model, error)

GetModel finds a Model definition and returns it to the caller.

func (Model) DestinationContentPath

func (m Model) DestinationContentPath() string

func (Model) DestinationFilePath

func (m Model) DestinationFilePath(slug string) string

func (Model) New

func (m Model) New(slug string) error

func (Model) SourceContentPath

func (m Model) SourceContentPath() string

func (Model) SourceFilePath

func (m Model) SourceFilePath(slug string) string

type Profile

type Profile struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`

	Company string `json:"company"`
	Title   string `json:"title"`

	SocialAccounts []SocialAccount `json:"social_accounts"`
	// contains filtered or unexported fields
}

func ProfileFromYAML

func ProfileFromYAML(path string) (Profile, error)

type SocialAccount

type SocialAccount struct {
	Network  string `json:"network"`
	Username string `json:"username"`
	Url      string `json:"url"`
}

Jump to

Keyboard shortcuts

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