Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions pkg/fusionauth/Domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3786,6 +3786,7 @@ type Key struct {
PrivateKey string `json:"privateKey,omitempty"`
PublicKey string `json:"publicKey,omitempty"`
Secret string `json:"secret,omitempty"`
Source KeySource `json:"source,omitempty"`
Type KeyType `json:"type,omitempty"`
}

Expand Down Expand Up @@ -3821,6 +3822,20 @@ const (
KeyAlgorithm_Ed25519 KeyAlgorithm = "Ed25519"
)

/**
* The source of a key.
*/
type KeySource string

func (e KeySource) String() string {
return string(e)
}

const (
KeySource_System KeySource = "System"
KeySource_TenantManager KeySource = "TenantManager"
)

type KeyType string

func (e KeyType) String() string {
Expand Down Expand Up @@ -3867,6 +3882,7 @@ type KeySearchCriteria struct {
BaseSearchCriteria
Algorithm KeyAlgorithm `json:"algorithm,omitempty"`
Name string `json:"name,omitempty"`
Source KeySource `json:"source,omitempty"`
Type KeyType `json:"type,omitempty"`
}

Expand Down
7 changes: 7 additions & 0 deletions pkg/fusionauth/Domain_dynamic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,13 @@ func Test_KeyAlgorithmImplementsStringer(t *testing.T) {
}
}

func Test_KeySourceImplementsStringer(t *testing.T) {
var enum interface{} = KeySource("Test")
if _, ok := enum.(fmt.Stringer); !ok {
t.Errorf("KeySource does not implement stringer interface\n")
}
}

func Test_KeyTypeImplementsStringer(t *testing.T) {
var enum interface{} = KeyType("Test")
if _, ok := enum.(fmt.Stringer); !ok {
Expand Down