github.com/pachyderm/pachyderm@v1.13.4/src/client/enterprise/enterprise.proto (about) 1 syntax = "proto3"; 2 3 package enterprise; 4 option go_package = "github.com/pachyderm/pachyderm/src/client/enterprise"; 5 6 import "google/protobuf/timestamp.proto"; 7 8 // Enterprise data structures 9 10 // EnterpriseRecord is the record we store in etcd for a Pachyderm enterprise 11 // token that has been provided to a Pachyderm cluster 12 message EnterpriseRecord { 13 string activation_code = 1; 14 15 // expires is a timestamp indicating when this activation code will expire. 16 google.protobuf.Timestamp expires = 2; 17 } 18 19 //// Enterprise Activation API 20 21 // TokenInfo contains information about the currently active enterprise token 22 message TokenInfo { 23 // expires indicates when the current token expires (unset if there is no 24 // current token) 25 google.protobuf.Timestamp expires = 1; 26 } 27 28 message ActivateRequest { 29 // activation_code is a Pachyderm enterprise activation code. New users can 30 // obtain trial activation codes 31 string activation_code = 1; 32 33 // expires is a timestamp indicating when this activation code will expire. 34 // This should not generally be set (it's primarily used for testing), and is 35 // only applied if it's earlier than the signed expiration time in 36 // 'activation_code'. 37 google.protobuf.Timestamp expires = 2; 38 } 39 message ActivateResponse { 40 TokenInfo info = 1; 41 } 42 43 message GetStateRequest {} 44 45 enum State { 46 NONE = 0; 47 ACTIVE = 1; 48 EXPIRED = 2; 49 } 50 51 message GetStateResponse { 52 State state = 1; 53 TokenInfo info = 2; 54 55 // activation_code will always be an empty string, 56 // call GetEnterpriseCode to get the activation code 57 string activation_code = 3; 58 } 59 60 message GetActivationCodeRequest {} 61 62 message GetActivationCodeResponse { 63 State state = 1; 64 TokenInfo info = 2; 65 string activation_code = 3; 66 } 67 68 message DeactivateRequest{} 69 message DeactivateResponse{} 70 71 service API { 72 // Provide a Pachyderm enterprise token, enabling Pachyderm enterprise 73 // features, such as the Pachyderm Dashboard and Auth system 74 rpc Activate(ActivateRequest) returns (ActivateResponse) {} 75 rpc GetState(GetStateRequest) returns (GetStateResponse) {} 76 rpc GetActivationCode(GetActivationCodeRequest) returns (GetActivationCodeResponse) {} 77 78 // Deactivate is a testing API. It removes a cluster's enterprise activation 79 // token and sets its enterprise state to NONE (normally, once a cluster has 80 // been activated, the only reachable state is EXPIRED). 81 // 82 // NOTE: This endpoint also calls DeleteAll (and deletes all Pachyderm data in 83 // its cluster). This is to avoid dealing with invalid, intermediate states 84 // (e.g. auth is activated but enterprise state is NONE) 85 rpc Deactivate(DeactivateRequest) returns (DeactivateResponse) {} 86 } 87