github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/api/firewaller/relation.go (about) 1 // Copyright 2017 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package firewaller 5 6 import ( 7 "gopkg.in/juju/names.v2" 8 9 "github.com/juju/juju/apiserver/params" 10 ) 11 12 // Relation represents a juju relation as seen by the firewaller worker. 13 type Relation struct { 14 tag names.RelationTag 15 life params.Life 16 } 17 18 // Tag returns the relation tag. 19 func (r *Relation) Tag() names.RelationTag { 20 return r.tag 21 } 22 23 // Life returns the relation's life cycle value. 24 func (r *Relation) Life() params.Life { 25 return r.life 26 }