-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb691fb
commit af211da
Showing
55 changed files
with
3,070 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
syntax = "proto3"; | ||
package akash.audit.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "akash/base/v1beta1/attribute.proto"; | ||
|
||
option go_package = "github.com/ovrclk/akash/x/audit/types/v1beta1"; | ||
|
||
// Msg defines the provider Msg service | ||
service Msg { | ||
// SignProviderAttributes defines a method that signs provider attributes | ||
rpc SignProviderAttributes(MsgSignProviderAttributes) returns (MsgSignProviderAttributesResponse); | ||
|
||
// DeleteProviderAttributes defines a method that deletes provider attributes | ||
rpc DeleteProviderAttributes(MsgDeleteProviderAttributes) returns (MsgDeleteProviderAttributesResponse); | ||
} | ||
|
||
// Provider stores owner auditor and attributes details | ||
message Provider { | ||
string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; | ||
|
||
string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; | ||
|
||
repeated akash.base.v1beta1.Attribute attributes = 4 [ | ||
(gogoproto.castrepeated) = "github.com/ovrclk/akash/types/v1beta1.Attributes", | ||
(gogoproto.nullable) = false, | ||
(gogoproto.jsontag) = "attributes", | ||
(gogoproto.moretags) = "yaml:\"attributes\"" | ||
]; | ||
} | ||
|
||
// Attributes | ||
message AuditedAttributes { | ||
option (gogoproto.equal) = false; | ||
option (gogoproto.goproto_stringer) = true; | ||
|
||
string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; | ||
|
||
string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; | ||
|
||
repeated akash.base.v1beta1.Attribute attributes = 3 [ | ||
(gogoproto.castrepeated) = "github.com/ovrclk/akash/types/v1beta1.Attributes", | ||
(gogoproto.nullable) = false, | ||
(gogoproto.jsontag) = "attributes", | ||
(gogoproto.moretags) = "yaml:\"attributes\"" | ||
]; | ||
} | ||
|
||
// AttributesResponse represents details of deployment along with group details | ||
message AttributesResponse { | ||
option (gogoproto.equal) = false; | ||
option (gogoproto.goproto_stringer) = true; | ||
|
||
repeated AuditedAttributes attributes = 1 | ||
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes", (gogoproto.moretags) = "yaml:\"attributes\""]; | ||
} | ||
|
||
// AttributesFilters defines filters used to filter deployments | ||
message AttributesFilters { | ||
option (gogoproto.equal) = false; | ||
option (gogoproto.goproto_stringer) = true; | ||
|
||
repeated string auditors = 1 [(gogoproto.jsontag) = "auditors", (gogoproto.moretags) = "yaml:\"auditors\""]; | ||
|
||
repeated string owners = 2 [(gogoproto.jsontag) = "owners", (gogoproto.moretags) = "yaml:\"owners\""]; | ||
} | ||
|
||
// MsgSignProviderAttributes defines an SDK message for signing a provider attributes | ||
message MsgSignProviderAttributes { | ||
option (gogoproto.equal) = false; | ||
|
||
string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; | ||
|
||
string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; | ||
|
||
repeated akash.base.v1beta1.Attribute attributes = 3 [ | ||
(gogoproto.castrepeated) = "github.com/ovrclk/akash/types/v1beta1.Attributes", | ||
(gogoproto.nullable) = false, | ||
(gogoproto.jsontag) = "attributes", | ||
(gogoproto.moretags) = "yaml:\"attributes\"" | ||
]; | ||
} | ||
|
||
// MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. | ||
message MsgSignProviderAttributesResponse {} | ||
|
||
// MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes | ||
message MsgDeleteProviderAttributes { | ||
option (gogoproto.equal) = false; | ||
|
||
string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; | ||
|
||
string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; | ||
|
||
repeated string keys = 3 [(gogoproto.jsontag) = "keys", (gogoproto.moretags) = "yaml:\"keys\""]; | ||
} | ||
|
||
// MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. | ||
message MsgDeleteProviderAttributesResponse {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
syntax = "proto3"; | ||
package akash.audit.v1beta2; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "akash/base/v1beta2/attribute.proto"; | ||
|
||
option go_package = "github.com/ovrclk/akash/x/audit/types/v1beta2"; | ||
|
||
// Msg defines the provider Msg service | ||
service Msg { | ||
// SignProviderAttributes defines a method that signs provider attributes | ||
rpc SignProviderAttributes(MsgSignProviderAttributes) returns (MsgSignProviderAttributesResponse); | ||
|
||
// DeleteProviderAttributes defines a method that deletes provider attributes | ||
rpc DeleteProviderAttributes(MsgDeleteProviderAttributes) returns (MsgDeleteProviderAttributesResponse); | ||
} | ||
|
||
// Provider stores owner auditor and attributes details | ||
message Provider { | ||
string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; | ||
|
||
string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; | ||
|
||
repeated akash.base.v1beta2.Attribute attributes = 4 [ | ||
(gogoproto.castrepeated) = "github.com/ovrclk/akash/types/v1beta2.Attributes", | ||
(gogoproto.nullable) = false, | ||
(gogoproto.jsontag) = "attributes", | ||
(gogoproto.moretags) = "yaml:\"attributes\"" | ||
]; | ||
} | ||
|
||
// Attributes | ||
message AuditedAttributes { | ||
option (gogoproto.equal) = false; | ||
option (gogoproto.goproto_stringer) = true; | ||
|
||
string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; | ||
|
||
string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; | ||
|
||
repeated akash.base.v1beta2.Attribute attributes = 3 [ | ||
(gogoproto.castrepeated) = "github.com/ovrclk/akash/types/v1beta2.Attributes", | ||
(gogoproto.nullable) = false, | ||
(gogoproto.jsontag) = "attributes", | ||
(gogoproto.moretags) = "yaml:\"attributes\"" | ||
]; | ||
} | ||
|
||
// AttributesResponse represents details of deployment along with group details | ||
message AttributesResponse { | ||
option (gogoproto.equal) = false; | ||
option (gogoproto.goproto_stringer) = true; | ||
|
||
repeated AuditedAttributes attributes = 1 | ||
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes", (gogoproto.moretags) = "yaml:\"attributes\""]; | ||
} | ||
|
||
// AttributesFilters defines filters used to filter deployments | ||
message AttributesFilters { | ||
option (gogoproto.equal) = false; | ||
option (gogoproto.goproto_stringer) = true; | ||
|
||
repeated string auditors = 1 [(gogoproto.jsontag) = "auditors", (gogoproto.moretags) = "yaml:\"auditors\""]; | ||
|
||
repeated string owners = 2 [(gogoproto.jsontag) = "owners", (gogoproto.moretags) = "yaml:\"owners\""]; | ||
} | ||
|
||
// MsgSignProviderAttributes defines an SDK message for signing a provider attributes | ||
message MsgSignProviderAttributes { | ||
option (gogoproto.equal) = false; | ||
|
||
string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; | ||
|
||
string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; | ||
|
||
repeated akash.base.v1beta2.Attribute attributes = 3 [ | ||
(gogoproto.castrepeated) = "github.com/ovrclk/akash/types/v1beta2.Attributes", | ||
(gogoproto.nullable) = false, | ||
(gogoproto.jsontag) = "attributes", | ||
(gogoproto.moretags) = "yaml:\"attributes\"" | ||
]; | ||
} | ||
|
||
// MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. | ||
message MsgSignProviderAttributesResponse {} | ||
|
||
// MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes | ||
message MsgDeleteProviderAttributes { | ||
option (gogoproto.equal) = false; | ||
|
||
string owner = 1 [(gogoproto.jsontag) = "owner", (gogoproto.moretags) = "yaml:\"owner\""]; | ||
|
||
string auditor = 2 [(gogoproto.jsontag) = "auditor", (gogoproto.moretags) = "yaml:\"auditor\""]; | ||
|
||
repeated string keys = 3 [(gogoproto.jsontag) = "keys", (gogoproto.moretags) = "yaml:\"keys\""]; | ||
} | ||
|
||
// MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. | ||
message MsgDeleteProviderAttributesResponse {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
syntax = "proto3"; | ||
package akash.audit.v1beta2; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "akash/audit/v1beta2/audit.proto"; | ||
|
||
option go_package = "github.com/ovrclk/akash/x/audit/types/v1beta2"; | ||
|
||
// GenesisState defines the basic genesis state used by audit module | ||
message GenesisState { | ||
repeated AuditedAttributes attributes = 1 | ||
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes", (gogoproto.moretags) = "yaml:\"attributes\""]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
syntax = "proto3"; | ||
|
||
// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | ||
|
||
package akash.audit.v1beta2; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
import "akash/audit/v1beta2/audit.proto"; | ||
|
||
option go_package = "github.com/ovrclk/akash/x/audit/types/v1beta2"; | ||
|
||
// Query defines the gRPC querier service | ||
service Query { | ||
// AllProvidersAttributes queries all providers | ||
// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE | ||
// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | ||
rpc AllProvidersAttributes(QueryAllProvidersAttributesRequest) returns (QueryProvidersResponse) { | ||
option (google.api.http).get = "/akash/audit/v1beta2/audit/attributes/list"; | ||
} | ||
|
||
// ProviderAttributes queries all provider signed attributes | ||
// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE | ||
// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | ||
rpc ProviderAttributes(QueryProviderAttributesRequest) returns (QueryProvidersResponse) { | ||
option (google.api.http).get = "/akash/audit/v1beta2/audit/attributes/{owner}/list"; | ||
} | ||
|
||
// ProviderAuditorAttributes queries provider signed attributes by specific auditor | ||
// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE | ||
// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | ||
rpc ProviderAuditorAttributes(QueryProviderAuditorRequest) returns (QueryProvidersResponse) { | ||
option (google.api.http).get = "/akash/audit/v1beta2/audit/attributes/{auditor}/{owner}"; | ||
} | ||
|
||
// AuditorAttributes queries all providers signed by this auditor | ||
// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE | ||
// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME | ||
rpc AuditorAttributes(QueryAuditorAttributesRequest) returns (QueryProvidersResponse) { | ||
option (google.api.http).get = "/akash/provider/v1beta2/auditor/{auditor}/list"; | ||
} | ||
} | ||
|
||
// QueryProvidersResponse is response type for the Query/Providers RPC method | ||
message QueryProvidersResponse { | ||
repeated Provider providers = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Providers"]; | ||
|
||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
// QueryProviderRequest is request type for the Query/Provider RPC method | ||
message QueryProviderRequest { | ||
string auditor = 1; | ||
string owner = 2; | ||
} | ||
|
||
// QueryAllProvidersAttributesRequest is request type for the Query/All Providers RPC method | ||
message QueryAllProvidersAttributesRequest { | ||
cosmos.base.query.v1beta1.PageRequest pagination = 1; | ||
} | ||
|
||
// QueryProviderAttributesRequest is request type for the Query/Provider RPC method | ||
message QueryProviderAttributesRequest { | ||
string owner = 1; | ||
cosmos.base.query.v1beta1.PageRequest pagination = 2; | ||
} | ||
|
||
// QueryProviderAuditorRequest is request type for the Query/Providers RPC method | ||
message QueryProviderAuditorRequest { | ||
string auditor = 1; | ||
string owner = 2; | ||
} | ||
|
||
// QueryAuditorAttributesRequest is request type for the Query/Providers RPC method | ||
message QueryAuditorAttributesRequest { | ||
string auditor = 1; | ||
cosmos.base.query.v1beta1.PageRequest pagination = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
syntax = "proto3"; | ||
|
||
package akash.base.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
|
||
option (gogoproto.goproto_stringer_all) = false; | ||
option (gogoproto.stringer_all) = false; | ||
option go_package = "github.com/ovrclk/akash/types/v1beta1"; | ||
|
||
// Attribute represents key value pair | ||
message Attribute { | ||
option (gogoproto.goproto_getters) = false; | ||
string key = 1 [(gogoproto.moretags) = "yaml:\"key\""]; | ||
string value = 2 [(gogoproto.moretags) = "yaml:\"value\""]; | ||
} | ||
|
||
// SignedBy represents validation accounts that tenant expects signatures for provider attributes | ||
// AllOf has precedence i.e. if there is at least one entry AnyOf is ignored regardless to how many | ||
// entries there | ||
// this behaviour to be discussed | ||
message SignedBy { | ||
option (gogoproto.goproto_getters) = false; | ||
// all_of all keys in this list must have signed attributes | ||
repeated string all_of = 1 [(gogoproto.jsontag) = "all_of", (gogoproto.moretags) = "yaml:\"allOf\""]; | ||
// any_of at least of of the keys from the list must have signed attributes | ||
repeated string any_of = 2 [(gogoproto.jsontag) = "any_of", (gogoproto.moretags) = "yaml:\"anyOf\""]; | ||
} | ||
|
||
// PlacementRequirements | ||
message PlacementRequirements { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
// SignedBy list of keys that tenants expect to have signatures from | ||
SignedBy signed_by = 1 | ||
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "signed_by", (gogoproto.moretags) = "yaml:\"signed_by\""]; | ||
|
||
// Attribute list of attributes tenant expects from the provider | ||
repeated Attribute attributes = 2 | ||
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes", (gogoproto.moretags) = "yaml:\"attributes\""]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
syntax = "proto3"; | ||
package akash.base.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/ovrclk/akash/types/v1beta1"; | ||
|
||
// Endpoint describes a publicly accessible IP service | ||
message Endpoint { | ||
option (gogoproto.equal) = true; | ||
// This describes how the endpoint is implemented when the lease is deployed | ||
enum Kind { | ||
// Describes an endpoint that becomes a Kubernetes Ingress | ||
SHARED_HTTP = 0; | ||
// Describes an endpoint that becomes a Kubernetes NodePort | ||
RANDOM_PORT = 1; | ||
} | ||
Kind kind = 1; | ||
} |
Oops, something went wrong.