dto

package
v0.0.0-...-85a151d Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshallMessage

func MarshallMessage(data interface{}) []byte

Types

type ActionType

type ActionType string
const (
	ActionTypeRead  ActionType = "read"
	ActionTypeWrite ActionType = "write"
	ActionTypeAdmin ActionType = "admin"
	ActionTypeUse   ActionType = "use"
)

type ByName

type ByName []Version

func (ByName) Len

func (s ByName) Len() int

func (ByName) Less

func (s ByName) Less(i, j int) bool

func (ByName) Swap

func (s ByName) Swap(i, j int)

type Credentials

type Credentials struct {
	Username string
	Password string
}

type Encrypt

type Encrypt struct {
	KeyID   uint
	Name    string
	Content string
}

type JWT

type JWT struct {
	Token string
}

type JWTClaims

type JWTClaims struct {
	UserID uint
	Sub    string
	Type   models.UserType
}

type JobMessage

type JobMessage struct {
	Type models.JobType
	ID   uint
}

type Keys

type Keys struct {
	P256dh string `json:"p256dh"`
	Auth   string `json:"auth"`
}

type Message

type Message []byte

func NewStatusMessage

func NewStatusMessage(jobType models.JobType, id uint, status models.Status) Message

type ObjectType

type ObjectType string
const (
	ObjectTypeInventory    ObjectType = "inventories"
	ObjectTypeSshKey       ObjectType = "ssh-keys"
	ObjectTypeTemplate     ObjectType = "templates"
	ObjectTypeApplications ObjectType = "applications"
	ObjectTypeTeams        ObjectType = "teams"
	ObjectTypeUsers        ObjectType = "users"
	ObjectTypeJobs         ObjectType = "jobs"
	ObjectTypeRepositories ObjectType = "repositories"
)

type Permission

type Permission struct {
	SubjectType SubjectType
	SubjectID   uint
	SubjectName string
	ObjectType  ObjectType
	ObjectID    uint
	ObjectName  string
	Action      ActionType
}

type PushSubscriptionDTO

type PushSubscriptionDTO struct {
	Endpoint string `json:"endpoint"`
	Keys     Keys   `json:"keys"`
}

type StatusMessage

type StatusMessage struct {
	Type   models.JobType
	ID     uint
	Status models.Status
}

type SubjectType

type SubjectType string
const (
	SubjectTypeTeam SubjectType = "teams"
	SubjectTypeUser SubjectType = "users"
)

type Version

type Version struct {
	Name    string
	Value   string
	SortKey string `json:"-"`
}

Jump to

Keyboard shortcuts

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