types

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditRecord

type AuditRecord struct {
	UID        uuid.UUID `gorm:"column:uid;index:idx_ar_uid" json:"uid,omitempty"`
	StartTime  time.Time
	EndTime    time.Time
	Kind       string    `gorm:"index:idx_ar_kind_targetid,idx_ar_kind_targetuid"`
	TargetID   uint      `gorm:"index:idx_ar_kind_targetid"`
	TargetUID  uuid.UUID `gorm:"column:target_uid;index:idx_ar_kind_targetuid"`
	Owner      string    `gorm:"index:idx_ar_owner"`
	JTI        string
	Error      string
	Log        string
	CancelInfo string
	Cancelable bool
	Running    bool
}

AuditRecord is the struct that represents AuditRecord event

type CertRequest

type CertRequest struct {
	UID        uuid.UUID `json:"uid,omitempty" gorm:"column:uid;index:idx_uid"`
	Command    string    `json:"command,omitempty" gorm:"column:command"`
	Key        string    `json:"key,omitempty" gorm:"column:key" sql:"type:text"`
	RemoteUser string    `json:"remote_user,omitempty" gorm:"column:remote_user;index:idx_remote_user"`
	RemoteHost string    `json:"remote_host,omitempty" gorm:"column:remote_host;index:idx_remote_host"`
	UserIP     string    `json:"user_ip,omitempty" gorm:"column:user_ip;index:idx_user_ip"`

	ValidAfter     time.Time     `json:"-" gorm:"column:valid_after;index:idx_va"`
	ValidBefore    time.Time     `json:"-" gorm:"column:valid_before;index:idx_vb"`
	PublicKey      ssh.PublicKey `json:"-" sql:"-" gorm:"-" db:"-"`
	KeyFingerprint string        `json:"-" gorm:"column:key_fingerprint"`

	// CA used in certificate sign
	CAPublicKey   ssh.PublicKey `json:"-" sql:"-" gorm:"-" db:"-"`
	CAFingerprint string        `json:"-" gorm:"column:ca_fingerprint"`
	KeyID         string        `json:"-" gorm:"column:key_id"`

	//Certificate KeyID and Serial Number, after signed
	CertKeyID       string `json:"-" gorm:"column:cert_key_id"`
	SerialNumber    string `json:"-" gorm:"column:cert_serial_number"`
	CertType        string `json:"-" gorm:"column:cert_type"`
	CertFingerprint string `json:"-" gorm:"column:cert_fingerprint"`

	// Columns for database
	ID         uint       `json:"-" gorm:"primary_key"`
	CreatedAt  time.Time  `json:"-"`
	DeletedAt  *time.Time `json:"-" sql:"index"`
	ModifiedAt time.Time  `json:"-"`
}

CertRequest is the struct that represents a certificate request

type Change

type Change struct {
	Field  string
	Before interface{}
	After  interface{}
}

Change is the structure that keeps the modifications made and the original values

type Role

type Role struct {
	ID         string `json:"id"`
	RemoteUser string `json:"remote_user"`
	SourceIP   string `json:"user_ip"`
	TargetIP   string `json:"remote_host"`
	Actions    string `json:"actions"`
}

Role is the struct responsible for holding all information needed for a policy

type Target

type Target struct {
	Label        string
	Endpoint     string
	TokenStorage string
}

Target is the struct that represents GSH API target

Jump to

Keyboard shortcuts

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