rest

package
v0.8.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

README

Structs (not objects!) shared by the REST API and the Gort client.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Name  string `json:"name,omitempty"`
	Users []User `json:"users,omitempty"`
}

Group is a data struct used to exchange data between a Gort client and a Gort controller's REST service.

type Role

type Role struct {
	Name        string
	Permissions []RolePermission
}

type RolePermission

type RolePermission struct {
	BundleName string
	Permission string
}

func (RolePermission) String

func (r RolePermission) String() string

type Token

type Token struct {
	Duration   time.Duration `json:"-"`
	Token      string        `json:",omitempty"`
	User       string        `json:",omitempty"`
	ValidFrom  time.Time     `json:",omitempty"`
	ValidUntil time.Time     `json:",omitempty"`
}

Token contains all of the metadata for an access token.

func (Token) IsExpired

func (t Token) IsExpired() bool

IsExpired returns true if the token has expired.

type User

type User struct {
	Email    string `json:"email,omitempty"`
	FullName string `json:"fullname,omitempty"`
	Password string `json:"password,omitempty"`
	Username string `json:"username,omitempty"`
}

User is a data struct used to exchange data between a Gort client and a Gort controller REST service.

Jump to

Keyboard shortcuts

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