coldfront

package
v0.0.0-...-bda3574 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CFImportAssociationsScript string

Functions

func CheckIngestFlag

func CheckIngestFlag() bool

func EndIngestFlag

func EndIngestFlag()

func IngestGETHandler

func IngestGETHandler(w http.ResponseWriter, r *http.Request)

func IngestManifest

func IngestManifest() error

func IngestPOSTHandler

func IngestPOSTHandler(w http.ResponseWriter, r *http.Request)

func StartIngestFlag

func StartIngestFlag()

Types

type Association

type Association struct {
	Fields AssociationFields `json:"fields"`
	Model  string            `json:"model"`
}

func NewAssociation

func NewAssociation(user, project, owner string) Association

func (Association) FromJSON

func (a Association) FromJSON(s string) (Association, error)

func (*Association) SetManager

func (a *Association) SetManager()

func (*Association) SetPI

func (a *Association) SetPI()

func (Association) ToJSON

func (a Association) ToJSON() (string, error)

type AssociationFields

type AssociationFields struct {
	User                []string                `json:"user"`
	Project             AssociationProjectField `json:"project"`
	Role                []string                `json:"role"`
	Status              []string                `json:"status"`
	EnableNotifications bool                    `json:"enable_notifications"`
}

func NewAssociationFields

func NewAssociationFields(user, project, owner string) AssociationFields

type AssociationLoaderResponse

type AssociationLoaderResponse struct {
	Created []struct {
		Project  string `json:"project"`
		Username string `json:"user"`
	} `json:"created"`
	Removed []struct {
		Project  string `json:"project"`
		Username string `json:"user"`
	} `json:"removed"`
}

type AssociationProjectField

type AssociationProjectField struct {
	Name string
	PI   string
}

func (AssociationProjectField) MarshalJSON

func (a AssociationProjectField) MarshalJSON() ([]byte, error)

func (*AssociationProjectField) UnmarshalJSON

func (a *AssociationProjectField) UnmarshalJSON(b []byte) error

type Project

type Project struct {
	Fields ProjectFields `json:"fields"`
	Model  string        `json:"model"`
}

func NewProject

func NewProject(title, pi string) Project

func (Project) FromJSON

func (p Project) FromJSON(s string) (Project, error)

func (Project) ToJSON

func (p Project) ToJSON() (string, error)

type ProjectFields

type ProjectFields struct {
	Description    string   `json:"description"`
	FieldOfScience []string `json:"field_of_science"`
	ForceReview    bool     `json:"force_review"`
	Pi             []string `json:"pi"`
	RequiresReview bool     `json:"requires_review"`
	Status         []string `json:"status"`
	Title          string   `json:"title"`
}

func NewProjectFields

func NewProjectFields(title, pi string) ProjectFields

type User

type User struct {
	Fields UserFields `json:"fields"`
	Model  string     `json:"model"`
}

func NewUser

func NewUser(username, firstname, lastname string) User

func (User) FromJSON

func (u User) FromJSON(s string) (User, error)

func (User) ToJSON

func (u User) ToJSON() (string, error)

type UserFields

type UserFields struct {
	Username    string `json:"username"`
	Firstname   string `json:"first_name"`
	Lastname    string `json:"last_name"`
	Email       string `json:"email"`
	IsActive    bool   `json:"is_active"`
	IsStaff     bool   `json:"is_staff"`
	IsSuperuser bool   `json:"is_superuser"`
}

func NewUserFields

func NewUserFields(username, firstname, lastname string) UserFields

Jump to

Keyboard shortcuts

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