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 ¶
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
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 ¶
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
type AuthProviders ¶
type AuthProviders []*AuthProvider
AuthProviders The authentication provider configuration, in the order they are shown
swagger:model authProviders
func (AuthProviders) ContextValidate ¶
ContextValidate validate this auth providers based on the context it is used
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 ¶
ContextValidate validates this error based on context it is used
func (*Error) MarshalBinary ¶
MarshalBinary interface implementation
func (*Error) UnmarshalBinary ¶
UnmarshalBinary interface implementation
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 ¶
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
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 ¶
ContextValidate validate this plan based on the context it is used
func (*Plan) MarshalBinary ¶
MarshalBinary interface implementation
func (*Plan) UnmarshalBinary ¶
UnmarshalBinary interface implementation
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 ¶
ContextValidate validate this project based on the context it is used
func (*Project) MarshalBinary ¶
MarshalBinary interface implementation
func (*Project) UnmarshalBinary ¶
UnmarshalBinary interface implementation
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 ¶
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
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 ¶
ContextValidate validates this question based on context it is used
func (*Question) MarshalBinary ¶
MarshalBinary interface implementation
func (*Question) UnmarshalBinary ¶
UnmarshalBinary interface implementation
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 ¶
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
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 ¶
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
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 ¶
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
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 ¶
ContextValidate validate this task based on the context it is used
func (*Task) MarshalBinary ¶
MarshalBinary interface implementation
func (*Task) UnmarshalBinary ¶
UnmarshalBinary interface implementation
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
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 ¶
ContextValidate validate this version based on the context it is used
func (*Version) MarshalBinary ¶
MarshalBinary interface implementation
func (*Version) UnmarshalBinary ¶
UnmarshalBinary interface implementation
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 ¶
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