acl

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: NCSA Imports: 13 Imported by: 1

README

acl Build Status

Documentation

Index

Constants

View Source
const (
	All = "all"
)

Variables

View Source
var ACLs sync.Map
View Source
var (
	// A list of all the roles. Currently, the roles
	// are defined statically within the program
	Roles = []Role{}
)

Functions

This section is empty.

Types

type ACL

type ACL struct {
	NetworkAccess bool     `json:"network_access,omitempty"`
	MountAccess   bool     `json:"mount_access,omitempty"`
	QueueAccess   []string `json:"queue_access,omitempty"`
	DockerPush    bool     `json:"docker_push,omitempty"`
	Limit         Limit    `json:"limit,omitempty"`
}

easyjson:json

func (ACL) MarshalEasyJSON

func (v ACL) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ACL) MarshalJSON

func (v ACL) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ACL) UnmarshalEasyJSON

func (v *ACL) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ACL) UnmarshalJSON

func (v *ACL) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Limit

type Limit struct {
	Runtime         time.Duration `json:"runtime,omitempty"`
	Storage         uint64        `json:"storage,omitempty"`
	MountStorage    uint64        `json:"mount_storage,omitempty"`
	NumberOfGPUs    uint64        `json:"number_of_gpus,omitempty"`
	CPUArchitecture string        `json:"cpu_architecture,omitempty"`
}

easyjson:json

func (Limit) MarshalEasyJSON

func (v Limit) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Limit) MarshalJSON

func (v Limit) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Limit) UnmarshalEasyJSON

func (v *Limit) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Limit) UnmarshalJSON

func (v *Limit) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Role

type Role string

roles are essentially permission groups

func (Role) ToACL

func (r Role) ToACL() (ACL, error)

func (Role) Validate

func (r0 Role) Validate() bool

Jump to

Keyboard shortcuts

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