github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/synchronization/session.proto (about)

     1  syntax = "proto3";
     2  
     3  package synchronization;
     4  
     5  option go_package = "github.com/mutagen-io/mutagen/pkg/synchronization";
     6  
     7  import "google/protobuf/timestamp.proto";
     8  
     9  import "synchronization/configuration.proto";
    10  import "synchronization/version.proto";
    11  import "url/url.proto";
    12  
    13  // Session represents a synchronization session configuration and persistent
    14  // state. It is mutable within the context of the daemon, so it should be
    15  // accessed and modified in a synchronized fashion. Outside of the daemon (e.g.
    16  // when returned via the API), it should be considered immutable.
    17  message Session {
    18      // The identifier, version, creationTime, and creatingVersion* fields are
    19      // considered the "header" fields for all session versions. A message
    20      // composed purely of these fields is guaranteed to be compatible with all
    21      // future session versions. This can be used to dispatch session decoding to
    22      // more specific message structures once multiple session version formats
    23      // are implemented.
    24  
    25      // Identifier is the (unique) session identifier. It is static. It cannot be
    26      // empty.
    27      string identifier = 1;
    28      // Version is the session version. It is static.
    29      Version version = 2;
    30      // CreationTime is the creation time of the session. It is static. It cannot
    31      // be nil.
    32      google.protobuf.Timestamp creationTime = 3;
    33      // CreatingVersionMajor is the major version component of the version of
    34      // Mutagen which created the session. It is static.
    35      uint32 creatingVersionMajor = 4;
    36      // CreatingVersionMinor is the minor version component of the version of
    37      // Mutagen which created the session. It is static.
    38      uint32 creatingVersionMinor = 5;
    39      // CreatingVersionPatch is the patch version component of the version of
    40      // Mutagen which created the session. It is static.
    41      uint32 creatingVersionPatch = 6;
    42  
    43      // The remaining fields are those currently used by session version 1.
    44  
    45      // Alpha is the alpha endpoint URL. It is static. It cannot be nil.
    46      url.URL alpha = 7;
    47      // Beta is the beta endpoint URL. It is static. It cannot be nil.
    48      url.URL beta = 8;
    49      // Configuration is the flattened session configuration. It is static. It
    50      // cannot be nil.
    51      Configuration configuration = 9;
    52      // ConfigurationAlpha are the alpha-specific session configuration
    53      // overrides. It is static. It may be nil for existing sessions loaded from
    54      // disk, but it is not considered valid unless non-nil, so it should be
    55      // replaced with an empty default value in-memory if a nil on-disk value is
    56      // detected.
    57      Configuration configurationAlpha = 11;
    58      // ConfigurationBeta are the beta-specific session configuration overrides.
    59      // It is static. It may be nil for existing sessions loaded from disk, but
    60      // it is not considered valid unless non-nil, so it should be replaced with
    61      // an empty default value in-memory if a nil on-disk value is detected.
    62      Configuration configurationBeta = 12;
    63      // Name is a user-friendly name for the session. It may be empty and is not
    64      // guaranteed to be unique across all sessions. It is only used as a simpler
    65      // handle for specifying sessions. It is static.
    66      string name = 14;
    67      // Labels are the session labels. They are static.
    68      map<string, string> labels = 13;
    69      // Paused indicates whether or not the session is marked as paused.
    70      bool paused = 10;
    71      // NOTE: Fields 11, 12, 13, and 14 are used above. They are out of order for
    72      // historical reasons.
    73  }