models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {

	// emulator Url
	EmulatorURL string `json:"emulatorUrl,omitempty"`

	// gcp auth domain
	// Required: true
	GcpAuthDomain *string `json:"gcpAuthDomain"`

	// gcp public Api key
	// Required: true
	GcpPublicAPIKey *string `json:"gcpPublicApiKey"`

	// providers
	// Required: true
	Providers AuthProviders `json:"providers"`
}

AuthConfig Authentication configuration for the deployment

swagger:model authConfig

func (*AuthConfig) ContextValidate

func (m *AuthConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this auth config based on the context it is used

func (*AuthConfig) MarshalBinary

func (m *AuthConfig) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AuthConfig) UnmarshalBinary

func (m *AuthConfig) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AuthConfig) Validate

func (m *AuthConfig) Validate(formats strfmt.Registry) error

Validate validates this auth config

type AuthProvider

type AuthProvider struct {

	// The Google Identity Platform provider ID
	// Example: google.com
	// Required: true
	ID *string `json:"id"`

	// saml claims
	SamlClaims *SamlProviderClaimsMap `json:"samlClaims,omitempty"`

	// sign in options
	SignInOptions *SignInOptions `json:"signInOptions,omitempty"`

	// True if every user from this provider has access
	Whitelisted bool `json:"whitelisted,omitempty"`
}

AuthProvider auth provider

swagger:model authProvider

func (*AuthProvider) ContextValidate

func (m *AuthProvider) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this auth provider based on the context it is used

func (*AuthProvider) MarshalBinary

func (m *AuthProvider) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AuthProvider) UnmarshalBinary

func (m *AuthProvider) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AuthProvider) Validate

func (m *AuthProvider) Validate(formats strfmt.Registry) error

Validate validates this auth provider

type AuthProviders

type AuthProviders []*AuthProvider

AuthProviders The authentication provider configuration, in the order they are shown

swagger:model authProviders

func (AuthProviders) ContextValidate

func (m AuthProviders) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this auth providers based on the context it is used

func (AuthProviders) Validate

func (m AuthProviders) Validate(formats strfmt.Registry) error

Validate validates this auth providers

type Error

type Error struct {

	// code
	Code int64 `json:"code,omitempty"`

	// message
	// Required: true
	Message *string `json:"message"`
}

Error error

swagger:model error

func (*Error) ContextValidate

func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error based on context it is used

func (*Error) MarshalBinary

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this error

type GotPractices

type GotPractices struct {

	// The practices indexed by their ID
	// Required: true
	Practices map[string]lib.Practice `json:"practices"`

	// version
	// Required: true
	Version *string `json:"version"`
}

GotPractices got practices

swagger:model gotPractices

func (*GotPractices) ContextValidate

func (m *GotPractices) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this got practices based on the context it is used

func (*GotPractices) MarshalBinary

func (m *GotPractices) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GotPractices) UnmarshalBinary

func (m *GotPractices) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GotPractices) Validate

func (m *GotPractices) Validate(formats strfmt.Registry) error

Validate validates this got practices

type LocalUserData

type LocalUserData struct {
	ManuallyAuthorized bool
	CreationAlertSent  bool

	// Tokens for users authenticated by SAML IDPs don't populate these fields, so we need to manually capture them from the token for use when we don't have a token to hand (admin operations)
	Name  string
	Email string
}

LocalUserData captures extra information about a user, beyond what is in their ID token We could replicate the token info here, so we have a local copy of it, but in general it's better to use the firebase API to lookup that data instead Custom claims are duplicated, so that the attributes can be set instantly but in future sessions they don't need to be looked up

type Plan

type Plan struct {

	// attributes
	// Required: true
	Attributes *lib.PlanDetails `json:"attributes"`

	// id
	// Required: true
	// Read Only: true
	ID string `json:"id"`
}

Plan The plan with the details from its latest revision

swagger:model plan

func (*Plan) ContextValidate

func (m *Plan) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this plan based on the context it is used

func (*Plan) MarshalBinary

func (m *Plan) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Plan) UnmarshalBinary

func (m *Plan) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Plan) Validate

func (m *Plan) Validate(formats strfmt.Registry) error

Validate validates this plan

type Project

type Project struct {

	// attributes
	// Required: true
	Attributes *ProjectDetails `json:"attributes"`

	// id
	// Required: true
	// Read Only: true
	ID string `json:"id"`

	// The plan IDs associated with this project
	// Required: true
	// Read Only: true
	Plans []string `json:"plans"`
}

Project Projects are containers for plans

swagger:model project

func (*Project) ContextValidate

func (m *Project) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this project based on the context it is used

func (*Project) MarshalBinary

func (m *Project) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Project) UnmarshalBinary

func (m *Project) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Project) Validate

func (m *Project) Validate(formats strfmt.Registry) error

Validate validates this project

type ProjectDetails

type ProjectDetails struct {

	// Further information about the project, for example what teams and products are considered in scope
	Description string `json:"description,omitempty"`

	// short name
	// Required: true
	// Min Length: 1
	Name *string `json:"name"`
}

ProjectDetails project details

swagger:model projectDetails

func (*ProjectDetails) ContextValidate

func (m *ProjectDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this project details based on context it is used

func (*ProjectDetails) MarshalBinary

func (m *ProjectDetails) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ProjectDetails) UnmarshalBinary

func (m *ProjectDetails) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ProjectDetails) Validate

func (m *ProjectDetails) Validate(formats strfmt.Registry) error

Validate validates this project details

type Question

type Question struct {

	// A set of allowed answers.
	Answers []interface{} `json:"answers"`

	// A reference to be able to refer to the question.
	// Can be omitted if there is only one question in a task, in which case the question ID defaults to the task ID.
	// Must be unique within a practice.
	// Pattern: ^[a-z]+[a-zA-Z0-9]*$
	ID string `json:"id,omitempty"`

	// Whether to allow N/A as an answer.
	Na *bool `json:"na,omitempty"`

	// The question to ask
	// Required: true
	Text *string `json:"text"`
}

Question question

swagger:model question

func (*Question) ContextValidate

func (m *Question) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this question based on context it is used

func (*Question) MarshalBinary

func (m *Question) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Question) UnmarshalBinary

func (m *Question) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Question) Validate

func (m *Question) Validate(formats strfmt.Registry) error

Validate validates this question

type RevisionVersion

type RevisionVersion struct {

	// Plan this version is associated with
	PlanID string `json:"planId,omitempty"`

	// revision ID of this version
	// Required: true
	RevID *string `json:"revId"`

	// version
	// Required: true
	Version *Version `json:"version"`
}

RevisionVersion revision version

swagger:model revisionVersion

func (*RevisionVersion) ContextValidate

func (m *RevisionVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this revision version based on the context it is used

func (*RevisionVersion) MarshalBinary

func (m *RevisionVersion) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RevisionVersion) UnmarshalBinary

func (m *RevisionVersion) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RevisionVersion) Validate

func (m *RevisionVersion) Validate(formats strfmt.Registry) error

Validate validates this revision version

type SamlProviderClaimsMap

type SamlProviderClaimsMap struct {

	// department
	Department string `json:"department,omitempty"`

	// email
	// Required: true
	Email *string `json:"email"`

	// first name
	FirstName string `json:"firstName,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// picture URL
	PictureURL string `json:"pictureURL,omitempty"`

	// surname
	Surname string `json:"surname,omitempty"`
}

SamlProviderClaimsMap A mapping from SAML claims to fields used within the app. Presence indicates this provider is a SAML provider.

swagger:model samlProviderClaimsMap

func (*SamlProviderClaimsMap) ContextValidate

func (m *SamlProviderClaimsMap) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this saml provider claims map based on context it is used

func (*SamlProviderClaimsMap) MarshalBinary

func (m *SamlProviderClaimsMap) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SamlProviderClaimsMap) UnmarshalBinary

func (m *SamlProviderClaimsMap) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SamlProviderClaimsMap) Validate

func (m *SamlProviderClaimsMap) Validate(formats strfmt.Registry) error

Validate validates this saml provider claims map

type SignInOptions

type SignInOptions struct {

	// button color
	// Example: #5DBFD4
	ButtonColor string `json:"buttonColor,omitempty"`

	// icon Url
	IconURL string `json:"iconUrl,omitempty"`

	// User facing name for this option
	ProviderName string `json:"providerName,omitempty"`
}

SignInOptions Firebase signin options, original type defined at firebaseui.auth.Config['signInOptions']

swagger:model signInOptions

func (*SignInOptions) ContextValidate

func (m *SignInOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this sign in options based on context it is used

func (*SignInOptions) MarshalBinary

func (m *SignInOptions) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SignInOptions) UnmarshalBinary

func (m *SignInOptions) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SignInOptions) Validate

func (m *SignInOptions) Validate(formats strfmt.Registry) error

Validate validates this sign in options

type Task

type Task struct {

	// The full definition of what the task is. Try to include *why* this is a useful thing to do.
	// Required: true
	Description *string `json:"description"`

	// A reference for the task, unique within the practice, not visible to users. Use camelCase.
	// Required: true
	// Pattern: ^[a-z]+[a-zA-Z0-9]*$
	ID *string `json:"id"`

	// If a team is performing all of the tasks of a given level, their maturity rating for this practice is considered to be at that level.
	// Level 5 is reserved for teams going beyond the activities described in the practice.
	// If there are less than four levels, the order they should be introduced is: 4, 1, 2, 3.
	// Required: true
	// Maximum: 4
	// Minimum: 1
	Level *int64 `json:"level"`

	// Questions to determine whether or not the team already does this task.
	// If the team answer yes to all of these questions, then we assume this task is being performed.
	// Required: true
	// Min Items: 1
	Questions []*Question `json:"questions"`

	// A short summary of the task. Try and use the imperative tense.
	// Required: true
	Title *string `json:"title"`
}

Task A self-contained description of an activity that will improve product security.

swagger:model task

func (*Task) ContextValidate

func (m *Task) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this task based on the context it is used

func (*Task) MarshalBinary

func (m *Task) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Task) UnmarshalBinary

func (m *Task) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Task) Validate

func (m *Task) Validate(formats strfmt.Registry) error

Validate validates this task

type User

type User struct {
	Token  *auth.Token
	Claims map[string]interface{} // Firebase Custom Claims, looked up or extracted from the token

	// Standard fields from the token:
	UID                  string
	Provider             string // the identity provider, e.g. "google.com" or another provider ID configured in the Cloud Identity Platform
	DetailsNotInFirebase bool
	Email                string
	EmailVerified        bool
	Name                 string
	PictureURL           string
	Department           string

	// Additional data
	ManuallyAuthorized bool
	CreationAlertSent  bool // whether a notification has been sent about this user requesting access or logging in

	LookedUp  bool // Whether a lookup has been made for this user yet. If true, LocalData==nil means this user has no local data
	LocalData *LocalUserData
}

User represents an authenticated identity

func (*User) String

func (u *User) String() string

type Version

type Version struct {

	// author
	// Required: true
	Author *VersionAuthor `json:"author"`

	// The time this version was created
	// Required: true
	// Read Only: true
	// Format: date-time
	Time strfmt.DateTime `json:"time"`
}

Version version

swagger:model version

func (*Version) ContextValidate

func (m *Version) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this version based on the context it is used

func (*Version) MarshalBinary

func (m *Version) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Version) UnmarshalBinary

func (m *Version) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Version) Validate

func (m *Version) Validate(formats strfmt.Registry) error

Validate validates this version

type VersionAuthor

type VersionAuthor struct {

	// The user's display name
	// Required: true
	Name *string `json:"name"`

	// A profile image
	PictureURL string `json:"pictureUrl,omitempty"`

	// A site-wide unique ID
	// Required: true
	UID *string `json:"uid"`
}

VersionAuthor version author

swagger:model VersionAuthor

func (*VersionAuthor) ContextValidate

func (m *VersionAuthor) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this version author based on the context it is used

func (*VersionAuthor) MarshalBinary

func (m *VersionAuthor) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*VersionAuthor) UnmarshalBinary

func (m *VersionAuthor) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*VersionAuthor) Validate

func (m *VersionAuthor) Validate(formats strfmt.Registry) error

Validate validates this version author

Jump to

Keyboard shortcuts

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