model

package
v0.0.0-...-b9fdcee Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0, BSD-2-Clause, MIT Imports: 6 Imported by: 8

Documentation

Overview

Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause

Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause

Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause

Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause

Index

Constants

View Source
const (
	OpCreate = "C"
	OpRead   = "R"
	OpUpdate = "U"
	OpDelete = "D"
)

Variables

This section is empty.

Functions

func IsValidOpLabel

func IsValidOpLabel(label string) bool

func SecretsEqual

func SecretsEqual(s, t *SecretEntry) bool

func ValidOpLabels

func ValidOpLabels() []string

Types

type AuthorizationPolicyEntry

type AuthorizationPolicyEntry struct {
	Id                string      `json:"id"`
	RoleLabels        []string    `json:"roleLabels"`
	AllowedOperations []Operation `json:"allowedOperations"`
	Owner             string      `json:"owner"`
}

func ExtractAndValidateAuthorizationPolicyEntry

func ExtractAndValidateAuthorizationPolicyEntry(req *http.Request) (*AuthorizationPolicyEntry, error)

type CreationResponse

type CreationResponse struct {
	Id string `json:"id"`
}

type LoginRequest

type LoginRequest struct {
	Username  string `json:"username"`
	Challenge string `json:"challenge"`
}

func ExtractAndValidateLoginRequest

func ExtractAndValidateLoginRequest(req *http.Request) (*LoginRequest, error)

type LoginResponse

type LoginResponse struct {
	ChallengeOrToken string `json:"challengeOrToken"`
}

type NamespaceEntry

type NamespaceEntry struct {
	Path       string   `json:"path"`
	Owner      string   `json:"owner"`
	RoleLabels []string `json:"roleLabels"`
	ChildPaths []string `json:"childPaths"`
}

func ExtractAndValidateNamespaceEntry

func ExtractAndValidateNamespaceEntry(req *http.Request) (*NamespaceEntry, error)

func NewNamespaceEntry

func NewNamespaceEntry(ne *NamespaceEntry) *NamespaceEntry

type Operation

type Operation struct {
	Label string `json:"label"`
}

type RoleEntry

type RoleEntry struct {
	Scope string `json:"scope"`
	Label string `json:"label"`
}

func NewRoleEntry

func NewRoleEntry(re *RoleEntry) *RoleEntry

type SecretEntry

type SecretEntry struct {
	Id             string    `json:"id"`
	Type           string    `json:"type"`
	MetaData       string    `json:"metaData"`
	SecretData     []byte    `json:"secretData"`
	Owner          string    `json:"owner"`
	ExpirationTime time.Time `json:"expirationTime"`
}

func ExtractAndValidateSecretEntry

func ExtractAndValidateSecretEntry(req *http.Request) (*SecretEntry, error)

func NewSecretEntry

func NewSecretEntry(se *SecretEntry) *SecretEntry

type UserEntry

type UserEntry struct {
	Username    string      `json:"username"`
	Credentials []byte      `json:"credentials"`
	Roles       []RoleEntry `json:"roles"`
}

func ExtractAndValidateUserEntry

func ExtractAndValidateUserEntry(req *http.Request) (*UserEntry, error)

func NewUserEntry

func NewUserEntry(ue *UserEntry) *UserEntry

Jump to

Keyboard shortcuts

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