infoModel

package
v0.64.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionInfo

type ActionInfo struct {
	Name   string `json:"name,omitempty"`
	Method string `json:"method,omitempty"`
}

type AuthRequest

type AuthRequest struct {
	Subject  SubjectInfo  `json:"subject"`
	Action   ActionInfo   `json:"action,omitempty"`
	Resource ResourceInfo `json:"resource,omitempty"`
	Context  ContextInfo  `json:"context,omitempty"`
}

type AzInfo

type AzInfo struct {
	Req      *hexaOpaClient.ReqParams   `json:"req"`
	Subject  *hexaOpaClient.SubjectInfo `json:"subject"`
	Resource ResourceInfo               `json:"resource"`
}

type ContextInfo

type ContextInfo struct {
	json.RawMessage // no spec
}

type EvaluationsResponse

type EvaluationsResponse struct {
	Iat      time.Time       `json:"iat,omitempty"`
	Exp      time.Time       `json:"exp,omitempty"`
	Subject  SubjectInfo     `json:"subject,omitempty"`
	Decision []QueryDecision `json:"decision"`
	Reasons  []ReasonObject  `json:"reasons,omitempty"`
}

type QueryDecision

type QueryDecision struct {
	Action   string        `json:"action"`
	Resource ResourceInfo  `json:"resource"`
	Decision bool          `json:"decision"`
	Reasons  []json.Number `json:"reasons"`
}

type QueryItem

type QueryItem struct {
	Action   string       `json:"action"`
	Resource ResourceInfo `json:"resource"`
}

type QueryRequest

type QueryRequest struct {
	Subject SubjectInfo `json:"subject"`
	Queries []QueryItem `json:"queries"`
}

type ReasonObject

type ReasonObject struct {
	Id          json.Number       `json:"id"`
	ReasonAdmin map[string]string `json:"reason_admin,omitempty"`
	ReasonUser  map[string]string `json:"reason_user,omitempty"`
}

type ResourceInfo

type ResourceInfo struct {
	Id   string `json:"id,omitempty"`
	Type string `json:"type"`
	json.RawMessage
}

type SimpleResponse

type SimpleResponse struct {
	Decision bool `json:"decision"`
}

type SubjectInfo

type SubjectInfo struct {
	Identity   string `json:"identity,omitempty"`
	Username   string `json:"username,omitempty"`
	Jwt        string `json:"jwt,omitempty"`
	IpAddress  string `json:"ipAddress,omitempty"`
	DeviceId   string `json:"deviceId,omitempty"`
	Department string `json:"department,omitempty"`
}

type UserInfo

type UserInfo struct {
	Sub     string   `json:"sub"`
	Id      string   `json:"id"`
	Name    string   `json:"name"`
	Email   string   `json:"email"`
	Roles   []string `json:"roles"`
	Picture string   `json:"picture"`
}

type UserRecs

type UserRecs struct {
	Users []UserInfo `json:"users"`
}

Jump to

Keyboard shortcuts

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